How to detect a number change and than do something?

bullshinbullshin Member Posts: 8
edited November -1 in Working with GS (Mac)
Say, i want to detect whenever the character health deduct, the camera will shake.
What rule should i put in the trigger?

Cheers1

Comments

  • wormilwormil Member Posts: 127
    I've made a demo for you. I'd keep a second variable that keeps the last value and if they aren't the same do some stuff. If you click the mouse in the demo, it will move the camera.

    C represents health
    L represents last health

    actor2 instance does the camera shake business.

    It's located under 'camera shake'.
  • bullshinbullshin Member Posts: 8
    Hey there,
    V.nice of you, thanks!
    That means i can find ur template demo at gamesalad right?
    i will check it out as soon as i reach home~

    cheers!
Sign In or Register to comment.