Changing attributes only for a specific amount of time

aeseekeaeseeke Member, PRO Posts: 16

First off, hi!

I'm creating a game where when the player hits a power up they become invincible for a specific amount of time (say 6 seconds). When the actor hits the PUP I change a global attribute called invincible to true. After 6 seconds I want the attribute to be false again. I tried a For Timer and it doesn't really change the attribute back and I wasn't sure how to do it so I figured I'd ask the genius' :).

Any help is greatly appreciated!

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited July 2014

    You need an After timer.

    Timer after 6 seconds Change Attribute

    Be sure to check "run to completion" so that even if the rule condition changes the timer still completes.

  • aeseekeaeseeke Member, PRO Posts: 16

    Thank you Tatiang, that worked like a charm

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    You're welcome! If you want to notify someone on the forums, be sure to include the '@' symbol like this: @aeseeke.

Sign In or Register to comment.