Event on update

NRafNRaf Member Posts: 4
edited November -1 in Working with GS (Mac)
Hey,

I was wondering how I could go about calling an event whenever an attribute is updated? Also, in the event (or rule) that is called, I want the timer to be reset. How can I do this?

Comments

  • homelesswombathomelesswombat Member Posts: 73
    I think it depends on the type attribute.

    If the change in the attribute is caused by another game event (like a collision), you could create a Boolean global variable game.collision (for example) that is set to true whenever the game event occurs. Then you could set the rule to trigger whenever game.collision is true. Within the called rule you must use Change Attribute to set game.collision to false to set it back up again.

    If you're dealing with something that continuously updates like actor.position.x, that's entirely difficult.
  • NRafNRaf Member Posts: 4
    Okay, that makes sense. Kinda sucks that you can't call events for the second type, though. Any idea on resetting the timer.
Sign In or Register to comment.