How to display a timer? how to let your game add subtract points the display the final result ???

How to display a timer? how to let your game add subtract points the display the final result ???

Comments

  • VolontaArtsVolontaArts Member Posts: 510
    im not really sure, but i would go about trying maybe making an attribute that is = to the timer...

    then using the display text behavior to display the time.
  • luayidrissluayidriss Member Posts: 17
    Thank Youuuuuuuuu

    :-j :-j :-j :-j :-j :-j :-j :-j :-j :-j :-j
  • luayidrissluayidriss Member Posts: 17
    Anybody else that can awnser by other question ?? how to let your game add subtract points the display the final score ???
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    Anybody else that can awnser by other question ?? how to let your game add subtract points the display the final score ???
    Do you want to add or subtract from your score? And what are you adding or subtracting from your score?

    Change.Attribute : game.Score = game.Score - (Whatever you want)
    or
    Change.Attribute : game.Score = game.Score + (Whatever you want)
  • luayidrissluayidriss Member Posts: 17
    i'm adding up my score
    ex. u press a certain a button u get ten points
    you press another button u lose 20 pts
    then at the end of the game you get your score
  • luayidrissluayidriss Member Posts: 17
    thxxx again you guys are really helpful :-j :-j :-j :-j :-j :-j :-j :-j :-j :-j
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    On your minus 20 actor/button add

    Rule: If actor pressed
    Change.Attribute: game.score = game.score - 20

    And on your plus 20 actor/button add

    Rule: if actor pressed
    Change Attribute: game.score = game.score + 20

    If you find that the score continuously increases or decreases when you press and hold then try it with "if actor released".

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    To keep track of the, use the Timer behavior to do Every 1 second --> Change Attribute game.elapsedTime (an integer) to game.elapsedTime+1.

    Then use a DisplayText behavior to display game.elapsedTime.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • luayidrissluayidriss Member Posts: 17
    Thank You A Lot Guys :D :D :D :D :D :D :D :D :D :D :D :D Anything i Can do to help you Guys name it ... i'll do it
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Thank You A Lot Guys :D :D :D :D :D :D :D :D :D :D :D :D Anything i Can do to help you Guys name it ... i'll do it
    I'd like a helicopter. That sounds kind of fun.

    But seriously, this is sort of a pay it forward kind of community. Just help the next person who needs help and we'll call it even. ;)

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.