Help with having an actor do something based on what a different actors doing?

wump505wump505 Member Posts: 3
edited November -1 in Working with GS (Mac)
So i have a game where a player flies through a scene and the score is following him. I have the score counting +1 after every 0.05 seconds. I want the score to stop counting and the score to stop moving after my character dies. Any suggestions?

Comments

  • RattleheadRattlehead Member Posts: 485
    It sounds like the actor/character will be avoiding obstacles or something so I would create a global boolean variable called 'IsPlayerAlive' and then in whatever obstacles could kill the character, check for a collision with the player and change the global variable to false.

    Back inside the character actor you can then have a check to see if the variable deviates from being true and perform some action; such as playing a death animation and stopping the score (which is probably also global).

    HTH.

    -R.-
  • wump505wump505 Member Posts: 3
    Thanks ill try that.
Sign In or Register to comment.