Please help me stop the score from incrementing!

SaveDaveSaveDave Member Posts: 140
edited November -1 in Working with GS (Mac)
This is my setup...

I'm trying to have a score that counts up in 10's and upon pressing a button, stops the score

I have a timer that starts upon pressing a button, and it is set so that

Timer, every 0.01 seconds, score+10

Then an actor that is displaying score.

I have another button that I want so that when pressed it stops the score dead.

I have done the following:

When button "score2" is touched, destroy the actor that displays score and spawn new actor in the same position

Change attribute score2 = score

New actor displays score2

Why does this not work? What am I doing wrong?

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    What are you trying to accomplish? I'm not quite sure what you mean above.
  • SaveDaveSaveDave Member Posts: 140
    Sorry. I want to stop the score from continuting to count up upon pressing a button.
  • nulonulo Member Posts: 315
    create a attribute "counter_on" make it a boolean.

    then make
    -------
    RULE
    if counter_on is true
    timer every X seconds +10 to score
    -------------

    then on the button you make it change attribute "counter_on" to false when pressed
  • MotherHooseMotherHoose Member Posts: 2,456
    perhaps:

    a boolean attribute game.keepScore = 1

    on your stop button
    ......change game.keepScore to 0 (false)

    and your timer inside rule game.keepScore = 1

    MH
  • MotherHooseMotherHoose Member Posts: 2,456
    @nulo

    liked what you said...thought I'd repeat it! ;D

    on the phone...before I hit send!

    MH
  • SaveDaveSaveDave Member Posts: 140
    So simple and I'm making it so complex!

    Thanks guys!
Sign In or Register to comment.