The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.34 / 5.00 31,296 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.07 / 5.00 10,082 Viewsthat unlocks when you complete a level?
My idea didn't work D:
AS3 programmer.
Learn AS3, it's for your own good.
What was your idea? Simple way to do this is to have a boolean for every level.
var level1:Boolean = true;
var level2:Boolean = false;
var level3:Boolean = false;
...
...
When you finish level 1 you just set level2 to true and on the level select screen check with an if-clause what booleans are true and enable the level. You can also throw these booleans in an array if you know how to do that.
You can solve pretty much any problem you may have with AS3 by consulting the AS3 Language reference.
nah I don't know how to do that but thanks for the help :D
AS3 programmer.
Learn AS3, it's for your own good.
my if statement has an error... my first time using booleans xD
AS3 programmer.
Learn AS3, it's for your own good.
At 6/9/10 11:02 AM, potatopower wrote: my if statement has an error... my first time using booleans xD
Okay just give me two seconds while I concentrate really hard to read your mind and then solve the error for you...
You can solve pretty much any problem you may have with AS3 by consulting the AS3 Language reference.
thanks man... it worked.... the error is gone but it isn't working xD
AS3 programmer.
Learn AS3, it's for your own good.
Do it like this
var level1:Boolean = true;
var level2:Boolean = false;
var level3:Boolean = false;
...
if (char.hitTestObject(level1Goal)) {
level2 = true;
gotoAndStop("LevelSelect");
}
if(level2) {
level2_button.gotoAndStop("Unlocked")
}
I think that should work.
Rape l Sin or I R Apelsin, which ever suits me best...
Now I'll Trololo your face with an Apelsin!
yes that should work but I have read potato's mind and I have discovered that he has an MC labeled level2
isn't that right?