!!!! Temporary Attribute Help !!!!

Zenith_GameworksZenith_Gameworks Member Posts: 310
edited February 2013 in Working with GS (Mac)
So in my game, you have to avoid certain falling objects, but once in a while a power up falls that if your actor overlaps/touches it, gives temporary invincibility to that actor. I only want this invincibility to last for say, 10 seconds, and then for the actor to revert back to its original, vulnerable state. I also want this cycle to happen every time the actor overlaps/touches the power up. I made an integer invincibility attribute which says that if the actor touches the powerup, "set invincibility to 1 (original is 0) and tried using a timer, but it doesn't work; the actor becomes invincible permanently after overlap. Any examples of rules and attributes would be greatly appreciated ;).

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    edited February 2013
    Should be pretty easy to do, have you changed it back to 0 after 10 seconds?

    If overlap with power up change game.invincible to 1 then a rule if game.invincible is 1 after 10 seconds change game.invincible to 0.

    Darren.
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    Ok, I just did this, and also said that the actor can only be destroyed if invincibility is equal to 0, but still the problem persists. After the actor becomes "invincible" it becomes so permanently; the objects just bounce of off it countless times and the actor is not destroyed
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    Bump
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    Could I use interpolate somehow for this?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Make sure "run to completion" is checked on your timer. If that doesn't fix it, post a screenshot of your rules.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.