The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 Viewsvar killcount =0;
_root.wave = 1;
onEnterFrame = function() {
if(_root.killcount>9 && _root.killcount<20){
_root.wave = 2;}
}
Upon getting 10 kills, it's not setting the wave to 2
Works fine to me.
My testing code:
var killcount =0;
_root.wave = 1;
onEnterFrame = function() {
killcount ++;
text1.text = "Kills = "+killcount +" Wave = " +wave;
if(_root.killcount>9 && _root.killcount<20){
_root.wave = 2;
}
}
Dynamic text box text1 shows that the killcount increases and wave increases to 2 once the killcount's more than 9.
Ceterum censeo Carthaginem delendam esse.
i don't see a ten in that code so that could be the problem
At 8/16/09 11:49 AM, max15946 wrote: i don't see a ten in that code so that could be the problem
if(var > 9)
Equals
if(var >= 10)
Or in words:
if var is more than nine
equals
if var is more or equal to ten
:)
Ceterum censeo Carthaginem delendam esse.
oh cool i don't think i will need something like that soon but it is nice to know.
At 8/16/09 11:53 AM, max15946 wrote: oh cool i don't think i will need something like that soon but it is nice to know.
It's basic number variable checking. If you want to make games, you almost HAVE to use it.
Ceterum censeo Carthaginem delendam esse.
Well I couldn't understand the problem, especially as you said it was alright, so I did a bit of fidddling and solved it by thinking outside the box
At 8/16/09 12:32 PM, UnrealCanine wrote: Well I couldn't understand the problem, especially as you said it was alright, so I did a bit of fidddling and solved it by thinking outside the box
Meaning...?
Ceterum censeo Carthaginem delendam esse.
At 8/16/09 12:42 PM, FlashtooREV wrote:At 8/16/09 12:32 PM, UnrealCanine wrote: Well I couldn't understand the problem, especially as you said it was alright, so I did a bit of fidddling and solved it by thinking outside the boxMeaning...?
Changed the wave counter to a movie clip (which allows me to add a cool little animation upon getting a new wave), and added a _root.wave=2; to the second frame on that