-
Best score code
I've got a game I'm building and I wanted to offer a "best score" kinda thing. I had this idea:
if(_root.displayNumber > _root.best) {
_root.best=_root.displayNumber;
}
I guess I'm feeling like I might not be such a noob because it actually worked.
So, here's how I've got it set up.
"displayNumber" is displaying the frame number from an MC on the root level. When the player loses, it stops on the last number it counted.
When the player loses, the game also jumps to the "lose" frame, on which is the code I pasted above.
Then the player clicks on "play again" and the "best" number stays there until the player loses and goes through the code again.
Here's the game in progress (it's a "helicopter" type game I've been working on...seems like whenever I tell people I make online games they ask me if I've played the helicopter game, so I thought I would make a version)
http://www.goycodesign.com/images/ga.../pollenate.htm
NOTE: the game actually has five "lose" screens depending on how you "die".
And I've actually not been able to beat the game so if anyone beats it please let me know. I'm not sure it's possible, but I suck at playing games and I figure if I can beat it...it's too easy. Plus I'm on a mac and flash sucks pretty bad on a mac browser...at least for me.
Last edited by antijorge; 12-13-2008 at 11:49 PM.
-
Senior Member
is there a question in this post?
.. or are you just showing off
fracture2 - the sequel
fracture - retro shooter
blog - games, design and the rest
"2D is a format, not a limitation" -Luis Barriga
-
Kinda showing off...but really just presenting code so that someone else can use it.
Also, I guess if someone sees a potential problem with the code, that would be good to share.
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
|