PDA

View Full Version : How the heck do I Keep score (simple way)


kunafish
12-10-2001, 06:30 AM
I'm getting quite frustrated here. I'm trying to keep score in a game i'm creating (rookie actionscripter). All I want is the score to advance by one everytime a button is clicked (and a movie plays). When the score gets to 5 i want the game to end. Any helpers out there...or pointers to good tuts?

Jesse
12-10-2001, 09:03 AM
Start with the variables tute. You code should be as simple as:
// frame 1:
_root.score = 0;
// button
on (release) {
_root.score++;
if ( _root.score >= 5 ) {
// some action
}
}