PDA

View Full Version : Points / Score System Help!?


gav.cooper
11-06-2007, 01:50 PM
I’m having some trouble trying to implement a score / points system into a game I’m working on, was wondering if anyone could help?

Basically on each level the player is faced with 3 buttons, each button is worth a different amount of points (e.g) button 1 = 50 points, button 2 = 20 points, button 3 = 10 points.

There are a LOT of levels to this game, on each level the player is faced with a similar selection of buttons… depending on which button the player decides to click I then want to record the corresponding points and then show the final accumulative results at the END of the game.

Can anyone help? :confused:

kibilocomalifasa
11-06-2007, 09:55 PM
onClipEvent (enterFrame) {
if (the button is pressed) {
if (_root.dynamic txt instance name<100) {
_root.dynamic txt instance name+= (5);
}
}
}

gav.cooper
11-06-2007, 10:29 PM
thanks kibilocomalifasa, i'll try and look into that...

this evening I've been spending some time trying to figure it out... please take a look at the attached .FLA file.

From what I've been reading the actionscript code (actions layer on the timeline) should work, but I'm getting a good few error reports when I run the file.

Note how there are KeyFrames on the 'actions' layer at frames 1, 25, and 43, each keyframe holds a slightly different version of the scoring actionscript. I've been trying to make it so that when the player clicks the heart symbol anywhere between frame 1 - 24 they key 100 points on the score output, frames 25 - 42 = 40 points, frames 43 onwards = 10 points.

Where am I going wrong?

gav.cooper
11-07-2007, 11:43 PM
OK, I tried what kibilocomalifasa said and I couldnt get that working either, see attached file (test 02)

I can't see why the "test.zip" way wont work, saying that the method in "test 02.zip" should work too...

anyone? :eek:

gav.cooper
11-08-2007, 05:26 AM
none of this now needed... baby dead :o

(in other words... i've sorted it)