-
button help needed
ok, so i've got that when you click a button it takes you to the next frame/level of the game, but i want to make the next level harder, meaning you have to kill all the enemies to goto the next frame/level, so, how do i make it so you have to click ALL 3 buttons on the stage to go to the next frame? Or is there another way to do this? Any help will be greatly appreciated.
-
Maybe a countdown could be used, so every time i click on an enemy and kill them the countdown goes down one, and when it reaches 0, it will go to the next frame, i kinda get it but i don't know what the exact code would be, can you help me with this please?
-
Code:
// Assuming that all enemy is the same and this is within enemy symbol in library.
this.onRelease = function (){
_root.killed++;
}
Code:
// on _root frame 1
stop();
var maxkilled = 1;
var killed=0;
this.onEnterFrame=function(){
if(killed == maxkilled){
nextFrame();
}
}
// frame 2 just need
maxkilled = 3; killed = 0;
// then next frame could be
maxkilled = 10; killed=0;
// etc
-
Thanks for the reply, but i can't get it to work, i have the code you said in my flash, where did you intend the first bit of code you said to go? I have it at the end of the death sequence of the guy, meaning you watch the death sequence then it goes to the next frame, but nothing seems to be happening...
(i'm not getting an error report or anything either)
-
Senior Member
is it possible for you to upload ur FLA so that we can try at our end!
Tags for this Thread
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
|