How to show the current and the newly generated random score

DesBDesB Member Posts: 39
edited November -1 in Working with GS (Mac)
I am using the random function to increase a score, and would like to show both the current score and the new score at the same time. eg Score was 26, randomly increased by 5, new score is 31.
Does anyone know how to do this PLEASE...it is driving me scatty!!
Many thanks

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    make a attribute called score one. when the score is done increasing, change score one to the actual score attribute that goes up. That will save the last score. then have 2 actors with display tect, display the score one attribute in one, and the score attribute that goes up in the other. That will show you current score and alst score
  • DesBDesB Member Posts: 39
    Hi John
    Many thanks for your response. However, my apologies I have not been able to grasp your suggested process.....I would very much appreciate a slightly less abbreviated version......Please! (I am an "old" retired Gent...struggling with this stuff...but thoroughly enjoying it!)
    Thanks again
  • msonesmsones Inactive, Chef Emeritus Posts: 75
    Hi DesB,

    I think what John is trying to say is this:

    Create two attributes (I called them "score" and "score 1")
    I have two actors to display the two scores.

    In actor 1, I have a rule that says when the spacebar is pressed, two things happen. 1st, Score is changed to be the same as Score 1. Second, Score 1 gets a random amount added.
    I also have actor 1 display score 1 (this is the "new" score)

    In actor 2, I have a rule that says to display Score (this is the "old" score).

    What happens is when the score is increased, the first actor updates the old score to be what the new score is, and THEN updates the new score to the new value. Both display simultaneously.

    I hope that helps!
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    msones said:
    Hi DesB,

    I think what John is trying to say is this:

    Create two attributes (I called them "score" and "score 1")
    I have two actors to display the two scores.

    In actor 1, I have a rule that says when the spacebar is pressed, two things happen. 1st, Score is changed to be the same as Score 1. Second, Score 1 gets a random amount added.
    I also have actor 1 display score 1 (this is the "new" score)

    In actor 2, I have a rule that says to display Score (this is the "old" score).

    What happens is when the score is increased, the first actor updates the old score to be what the new score is, and THEN updates the new score to the new value. Both display simultaneously.

    I hope that helps!

    thanks for explaining better msones, its been a long night :p
  • DesBDesB Member Posts: 39
    Many Many thanks Guys....You are Stars!
    DesB
Sign In or Register to comment.