Adding score when hit an actor!

lantolanto Member Posts: 31
edited November -1 in Working with GS (Mac)
Hi! I need some help about adding score, when an actor collide with an other actor it will set 1+.... Anyone know how?

I really preciate for response!

Comments

  • DimensionGamesDimensionGames PRO Posts: 993
    Rule: when actor overlaps or collides with actor of type actor2

    Change attribute (in behaviours)

    game.score to game.score+1

    -----
    You will need to make an attribute called game.score.
    Go into the attributes section of the inspector and then press the plus sign.
    Then select integer.

    Hope this helps you out.

    Cheers.
  • lantolanto Member Posts: 31
    Thanks for quick response! But forgot to say that the score have to show up in the scene, do you know how to do that?
  • calvin9403calvin9403 Member Posts: 3,186
    make an actor for that
  • gazjmgazjm Member Posts: 578
    create an actor and position it where you would like the score to be displayed.

    In the actor create a display text rule and select to display game.score

    If you don't want the background square of the actor then change its opacity to 0.
  • lantolanto Member Posts: 31
    Thanks guys! One extra question..When the score hits ten I need a display text show up that says which actor who won.....Anyone know how it this forum??
Sign In or Register to comment.