Advance Levels based on points accumulated?

Subscribe to Advance Levels based on points accumulated? 7 posts

avatar for MavricksKid123 MavricksKid123 2 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?

 
avatar for Kalinium Kalinium 764 posts
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?

 
avatar for Nqkoi1 Nqkoi1 3753 posts
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.

 
avatar for Eggy Eggy 1434 posts
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

 
avatar for MavricksKid123 MavricksKid123 2 posts
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.

 
avatar for ZachAttack ZachAttack 1452 posts
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!

 
avatar for BigCheese BigCheese 390 posts
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.