-
I want to make it so you need a key to open a door. So I am using a variable. D will equal 0 when you get the key it will equal 1. So I am trying to make so if d=0 it will go to one place and if d=1 it willgo to another place. I'm not sure how to do this so can somebody please tell me how. Thanx.
-
Senior Member
If you only have two alternatives you can make it very easy. Like...
if (d == 0) {
gotoAndPlay("myFrameLabel");
} else {
gotoAndPlay("myOtherLabel");
}
-
Thanks
Thanks but for other times what if I had more than 2 alternatives. How would I do that?
-
Senior Member
Then you make a new If statement for all the alternatives.
if (d == 0) {
gotoAndPlay("myFrameLabel");
}
if (d == 1) {
gotoAndPlay("myFrameOtherLabel");
}
...and so on.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|