419 Forum Posts by "AntiAliasProductionz"
My girlfriend and i have sex steadily. She's been on the pill that lets you plan your period and whatnot and she hasn't had it in months. We've been safe every time and stuff, condoms and the like. Could she be pregnant?
var codes = "enter a code";
var cash = 0;
myButton.onRelease = function()
{
if (codes.toLowerCase() == "secret")
{
cash += 999999;
}
};
The setup should look like this to test it.
You need to put codes and cash in the variable box or else this code is useless.
At 8/9/10 01:00 AM, K-Guare wrote: Remember,
_root.codes is the TextField, and
_root.codes.text is the text inside of the TextField.
;)
Not necessarily. If codes the instance, yes, you are correct, but if codes is the variable, .text is not needed.
At 8/8/10 08:17 PM, up-a-notch wrote:At 8/8/10 07:56 PM, AntiAliasProductionz wrote: You'd have to have a listener if its on a key press, or a function for a button press.this goes on a frame right?
myButton.onPress = function(){
if(root.codes.toLowerCase == "secretcode"){
root.cash += 99999
}
}
Yes.
You'd have to have a listener if its on a key press, or a function for a button press.
myButton.onPress = function(){
if(root.codes.toLowerCase == "secretcode"){
root.cash += 99999
}
}
Making a few assumptions:
myButton is the name of your button
codes is a input textbox with the variable codes
cash is a dynamic textbox with the variable cash
Also, I'd consider it an engine because everything is based on arrays. The weapons, the shop items, the rooms, the characters. You can quite easily add a level by adding a keyframe with the new level in the room_mc then adding the rooms name into the room array. I dunno if you'd call it an engine, but it's certainly an "engine"
At 8/4/10 04:20 AM, sasuke2910 wrote:At 8/4/10 04:08 AM, AntiAliasProductionz wrote: updateGosh there's just to much stuff to test. >.<
save function added
bugs fixed
Help with more?
And this isn't really an engine. An engine would be more like making classes to handle input. Not really having to do anything with specific commands.
What you should probably do is build a REALLY GOOD text registery system that checks where you are, checks text input. Makes sure it's possible, makes sure you have the right items on you, see if it's not already done etc...
Then add all your commands.
Because it might be a pain right now. But testing every event in every area is going to make you want to shoot yourself in the end.
I'm just looking for minor glitches. I do have the game set up in arrays, the room code is based on the room array and whatnot. There are just some minor things i slip over, often, such as being able to die as a zombie.
Thanks for the advice, I'm sure you remember my other threads not too long ago, I've totally rebuilt the game several times to get a better understanding of actionscript.
At 8/4/10 04:01 AM, Littleluckylink wrote:
h that statement. And why don't you tell everyone who this programmer is? Chances are if he has the skills to actually make a game like that, we definitely would have heard of him somewhere along the line. You seem to preach to us so much that you found someone.
Even if you did find someone who'd do it free, how do you even know that they can bring your far fetched dream to a reality?
Double post,
Also, this kid doesn't know he's arguing with in my opinion, one of the best madness animators on this site. Seriously, hiii's animations suck.
update
save function added
bugs fixed
Help with more?
At 8/4/10 04:01 AM, Littleluckylink wrote:At 8/3/10 08:18 PM, hiii111 wrote: this thread was not pointless to me since (if you had read what i said) already got a person who is willing to make a madness game with me, the whole fucking point? THERE IS NO POINTwhat
yeah you pretty much just defined the word "contradict" with that statement. And why don't you tell everyone who this programmer is? Chances are if he has the skills to actually make a game like that, we definitely would have heard of him somewhere along the line. You seem to preach to us so much that you found someone.
Even if you did find someone who'd do it free, how do you even know that they can bring your far fetched dream to a reality?
I will give every dime i have to this kid if he has a programmer that can do the shit he wants for free. I'm 100% that he couldn't do that.
This kid is fucking stupid. His animation sucks, his negotiation skills are suckier and his attitude towards the community is suckiest.
At 8/3/10 07:48 PM, hiii111 wrote: It's funny because you didn't even make a character that looks good for shit, and i said i won't draw any characters, thanks for looking stupid
Shut the fuck up.
BUGS FOUND AND FIXED:
-Being able to type commands from the startup menu
-Being able to die while being a zombie
-Spelt entrance wrong
At 8/4/10 02:44 AM, YoinK wrote: it won't let me type...
Click on the text box.
Help with debugging my game? Its a text based RPG. Right now I'm just designing the game "engine", so there is no real goal in it.
Commands:
put on (hat, shirt, pants, shorts, drug dealer hat)
take off(^above^)
go (right, left,up,out)
get on bed
get off bed
die
turn into(maggie,liam,tyler,zombie)
smile
buy (shotgun, condom, katana)
check (clothes,invent,money)
equip (katana)
Its a small list, but it's enough to create an RPG out of it in the end. Plus the entire game is based off of customizable code written by me! (its disorganized and terribly coded, I'm a noob)
At 7/11/10 02:33 AM, HungarianSupermarket wrote: Let's make a game show. Where everyone loses.
am i cool yet?
It's called trolling.
All the people in this thread are deprived.
After The Burial
The Human Abstract (pre nocturne, skip the piano)
Protest The Hero
Anyone willing to list bugs for the game engine I'm making? I already know the following:
-When you leave the shop, the display is still "How may i help you"
-When you type anything in while in the shop it reloads the music.
THINGS TO KNOW
put on shirt
put on pants
put on hat
go right
go left
check money
check clothes
*when in shop*
yes
no
get out
leave
**you cannot buy anything. Working on getting that to work perfectly**
hopefully some bugs will be found.
The graphics are not permanent, nor is the title nor the character. This is just the code testing.
Also some things I'd don't quite understand:
- Is "linputy" a text box? If it is then you can't get the value out of it unless you use linputy.text
- Same with "_root.displayv"
- If you try _root.displayv == "stuff" it won't work. Use one equal sign to assign a value. Use 2 to compare values. But then again you'll want to do _root.displayv.text = "stuff" as mentioned before.
- Try to stay consitant with your naming. I see you have some functions that start with a capital letter and others that don't, I suggest just having all start with a lower case letter.
Honestly I don't know how your pulling this crap off. XD
Hope this helps. :3
Thanks. already learned the majority of this by fucking with things, but it would have helped. I dont understand cases at all and didnt know it existed.
-Inputy is a textbox, but with the variable inputy.
-displayv is the same.
I figured out that = thing aswell. I got the game working well. I rewrote this code a bunch of times and understand it a hell of a lot more. Thanks for the reply though ^-^.
The original problem by the way, was that the function WAS working, the trace happened, just the displayv wasn't. I'm assuming that was the fault of the ==.
At 7/11/10 12:02 AM, U-Gamer wrote: i wanted a button. besides, he just make a button. thats not good advice. a noob wouldn't know what to say to that either (im not a newb though, i just forgot. I've been trying to remember)
If you can't remember how to create a button like that, then you sir, are a noob.
I built a code for a text only game that was supposed to change the pants of a character when one types put on pants, and when one types something not recognized, it says you dont have it. That works. I wanted some form of duplicate detecter message so it wouldn't continually say put pants on. The trace works, the display does not. Help please?
function changePants()
{
if (inputy == "put on " + clothList[2] + "" && clothList[2] !== "no pants")
{
displayv = "You have" + clothList[2] + "already on";
clearInputy();
trace("Duplicate blocked");
}
if (inputy == "put on pants")
{
_root.liam_mc.pants.gotoAndStop(2);
clothList[2] = "pants";
clearInputy();
displayv = "You have put on " + clothList[2] + "";
}
else if (inputy == "take off pants")
{
_root.liam_mc.pants.gotoAndStop(1);
clothList[2] = "no pants";
clearInputy();
displayv = "You now have " + clothList[2] + "";
}
else
{
displayv = "You dont have a " + inputy + "";
clearInputy();
}
//variables
var inputy = "Enter Text";
var displayv = "Type play to start.";
musesound = new Sound(this);
musesound.attachSound("muse");
//functions
function cleartext(){
inputy = "";
}
startup();
function startup()
{
_root.attachMovie("intro","intro_mc",200);
room_mc._x = 0;
room_mc._y = 0;
musesound.start(0,0);
}
function ResetAll()
{
_root.inputy = " ";
_root.displayv = " ";
}
function heart()
{
liam_mc.attachMovie("heart","heart_mc",500);
liam_mc.heart_mc._x = -24
liam_mc.heart_mc._y = -31
}
function smile()
{
liam_mc.attachMovie("smile","smile_mc",400);
liam_mc.smile_mc._x = -18.20
liam_mc.smile_mc._y = -45.15
}
function Dead()
{
ResetALl();
_root.displayv = "You are dead. Deal with it";
room_mc.removeMovieClip();
liam_mc.removeMovieClip();
}
function Intro()
{
intro_mc.removeMovieClip;
_root.attachMovie("opening","opening_mc",200);
opening_mc._x = 0;
opening_mc._y = 0;
}
function room()
{
musesound.stop(0,0);
intro_mc.removeMovieClip();
opening_mc.removeMovieClip();
_root.attachMovie("room","room_mc",200);
room_mc._x = 0;
room_mc._y = 0;
_root.attachMovie("liam","liam_mc",300);
liam_mc._x = 230;
liam_mc._y = 280;
liam_mc.gotoAndStop(1);
hatoff;
shirtoff;
pantsoff;
_root.displayv = "You just woke up. What should you do?";
cleartext();
}
function haton()
{
_root.liam_mc.hat.gotoAndStop("on");
_root.displayv = "You put your hat on";
}
function dress()
{
_root.liam_mc.hat.gotoAndStop("on");
_root.liam_mc.shirt.gotoAndStop("on");
_root.liam_mc.pants.gotoAndStop("on");
_root.displayv == "You got dressed.";
}
function undress()
{
_root.liam_mc.hat.gotoAndStop("off");
_root.liam_mc.shirt.gotoAndStop("off");
_root.liam_mc.pants.gotoAndStop("off");
_root.displayv == "You got undressed.";
}
function hatoff()
{
_root.liam_mc.hat.gotoAndStop("off");
_root.displayv = "You take your hat off";
}
function shirton()
{
_root.liam_mc.shirt.gotoAndStop("on");
_root.displayv = "You put your shirt on";
}
function shirtoff()
{
_root.liam_mc.shirt.gotoAndStop("off");
_root.displayv = "You take your shirt off";
}
function pantson()
{
_root.liam_mc.pants.gotoAndStop("on");
_root.displayv = "You put your pants on";
}
function pantsoff()
{
_root.liam_mc.pants.gotoAndStop("off");
_root.displayv = "You put your hat off";
}
function onbed()
{
liam_mc._x = 315;
liam_mc._y = 136;
}
function offbed()
{
liam_mc._x = 230;
liam_mc._y = 228;
}
//if statements
if (inputy == "play" && Key.isDown(Key.SHIFT))
{
room();
}
test_button.onRelease = function()
{
if (inputy.toLowerCase() == "play")
{
room();
}
else if (inputy.toLowerCase() == "die")
{
Dead();
}
else if (inputy.toLowerCase() == "reset")
{
ResetAll();
}
else if (inputy.toLowerCase() == "put shirt on")
{
shirton();
}
else if (inputy.toLowerCase() == "put pants on")
{
pantson();
}
else if (inputy.toLowerCase() == "put hat on")
{
haton();
}
else if (inputy.toLowerCase() == "take shirt off")
{
shirtoff();
}
else if ((_root.inputy.toLowerCase == "take off hat") || (_root.inputy.toLowerCase == "Throw hat off") || (_root.inputy == "Hat off")){
hatoff();
}
else if (inputy.toLowerCase() == "take pants off")
{
pantsoff();
}
else if (inputy.toLowerCase() == "get dressed")
{
dress();
}
else if (inputy.toLowerCase() == "get undressed")
{
undress();
}
else if (inputy.toLowerCase() == "get on bed")
{
onbed();
}
else if (inputy.toLowerCase() == "get off bed")
{
offbed();
}
else if (inputy.toLowerCase() == "kelsey")
{
heart();
smile();
}
else if (inputy.toLowerCase() == "smile")
{
smile();
}
};
Everything in that code works, I'm just pretty sure its a dumb way of doing things.
At 7/9/10 02:31 PM, AntiAliasProductionz wrote: function pantsoff()
{
_root.liam_mc.pants.gotoAndStop("off");
pants == "off";
_root.displayv = "You pants your hat off";
}
and
if (inputy.toLowerCase() == "take pants off")
{
pantsoff();
}
Copy and pasted 2 different codes. My bad.
Ok, so i finally got that thing i was bugging the forums about working. Now, after kirk-cocaine showed me that I was doing things stupidly and hard, i was wondering if there was an easier way to do these things here:
Put on items
Move Places
Do actions
Talk to people
I've got it working and all, just I'm defining every action with
function pantsoff()
{
_root.liam_mc.pants.gotoAndStop("off");
pants == "off";
_root.displayv = "You take your hat off";
}
and
if (inputy.toLowerCase() == "take hat off")
{
hatoff();
}
Is there a better way to do this? I'm ending up with 6 functions and 6 if statements for 3 items (on, off).
I think I'm going to ragequit life now, this game caused me to want to die. no more working on it ever.
Rage.
What I hoped would be a simple project for fun ended up with me getting angry as hell.
// variables
var display = "Type Play to start the game";
var input:String = myTextBox.text.toUpperCase();
var input = "Enter Text Here";
var ListenerObject:Object = new Object();
//functions
Key.addListener(ListenerObject);
var input:String = myTextBox.text.toUpperCase();
ListenerObject.onKeyDown = function() {
if (input == "PLAY") {
_root.attachMovie("level1","level_1",200);
level_1._x = 0;
level_1._y = 0;
}
};
That is totally wrong.
What I intended to do was:
When play is entered and enter is pressed, the flash loads the movieclip level1(the background)
What I ended up doing was:
input becomes undefined, I have no idea how to set the listener to find the enter key.
Still playing around with it, help would be greatly appreciated though, could save me hours of messing around to understand things.
At 7/8/10 10:46 PM, Kirk-Cocaine wrote: Use listeners.
Also, they way you're doing your if statements if stupid. What if some types plaY, or PlAy, or pLAy? You should convert the string to upper (or lower) case like this:
var myString:String = myTextBox.text.toUpperCase();
if (myString == "PLAY") {
//Play Code
}
Why thank you. I knew there was something i could do to make things better.
By any chance, is there a simplistic way to create a command line in flash? i.e: If someone types
:say I hate you.
I only want the display text to say
:i hate you
or even
:You say I hate you
If there's no easy way, could you possibly refer me to some commands i should learn to understand how I could do that? Just the commands, I'll do some google searching about to find more out about them.
Thanks :D
At 7/8/10 10:21 PM, GreenAlienAnimations wrote: You could do
on(keyPress<Enter>){
//command
}
on a button.
Sorry, I should have noted that I'm doing all the code from the timeline XD
on(keyPress<Enter>){
does not work from the timeline.
I'm making an EXTREMELY simple text based game like don't shit your pants. I know practically nothing when it comes to as2, and i have no intention of learning as3. I want the enter key to start a function like a button would :
enterbutton.onRelease = function() {
if (input == "play" || input == "Play" || input == "PLAY") {
_root.attachMovie("level1","level_1",200)
level_1._x =0
level_1._y =0
}
}
except i have no idea how. Can anyone help me?
At 6/16/10 09:38 PM, Nano256 wrote:At 6/16/10 09:36 PM, AntiAliasProductionz wrote:Well, using an assignment operator instead of an equality operator sure as heck won't ever make the code work properly, as assigning a variable to something will always evaluate to true and therefore those if statements will always fire.At 6/16/10 09:32 PM, Nano256 wrote: You need to use "==" not "=".Using that just screwed up the code.
I realized how my comment looked offensive. No offense intended.
The problem is that with the code, only the first 2 work. It's not as if they all aren't working, only the last 2.

