Advance Levels based on points accumulated?

7 posts

Flag Post

I made a shooting game and i wanna make it so that it will take me to another frame once I reach a certain amount of points. Any code ideas?

 
Flag Post

I can’t see where the challenge is in doing that. Surely you can just make it if you’ve done the rest of the shooting game?

 
Flag Post

Yea isn`t it “if score is * gotoandstop frame *” I don`t know how to do that in script but surely someone who has made a whole shooting game can.

 
Flag Post

Put this on any movieclip…

onClipEvent (enterFrame) {
If (_root.amountofpoints == 10) {
_root.gotoAndStop(5)
}
}

where amount of points is your variable, 10 is the number you want it to hit, and 5 in goto and stop is the frame you want it to go to.

I hope thats what you wanted anyways

 
Flag Post

thanks ill try both ideas

eggy urs worked!! but wne i go to the next frame (its a congrats frame) the shooting guy and targets are still there.

 
Flag Post

eggy, Your code didn’t work for my game…

My Variable was called “clock”, and I set it when It reached 500, to go to Frame 184, but once clock == 500, It didn’t go to Frame 184… it continued to play on as normal.

EDIT: I found out what I did wrong… I accidentally forgot to add the _root, so I guess it was saying when the Clock reached 500, it would go to Frame 184 on the Movie Clip, which did not exist.

Thanks for the Code!

 
Flag Post

If you want to get of all of the objects, you could loop through them all and use removeMovieClip(MC); to remove each one.