Invincibility (HELP!!)

First off, I would like to say how much I have enjoyed using Gamesalad so far. The past few weeks most every problem I have encountered could be fixed by really just sitting down and tinkering. But right now, for my platformer, it just isn't the case. I am trying to create some invincibility function, and its just NOT WORKING! I have the following
boolean game attribute "Invincibility" ( have also tried to make it an actor attribute with similar problems)
integer game attribute "playerhealth"
rule
when player overlaps or collides with actor with tag "enemies" (have already verified that only proper actors have this tag)
AND
game attribute "invincible" is false
change attribute "playerhealth" to "playerhealth-1"
timer
for 2 seconds (have tried both run to completion and not run to completion)
change attribute "invincible" to true
otherwise
change attribute to false
Know, this simple formula alone just doesnt seem to work right. The basic problem I have is it seems to change the attribute once, making character invincible for 2 seconds after being hit the first time, but never again. I wont get into the other stuff I had piled on top, becuase that was causing other issues. I have pulled the other rules out to solve this problem first. Can anyone tell me what I am doing wrong?
Note:
I am using the health bar (playerhealth) described by tshirt booth in his youtube vid
please let me know if you need anymore info.
boolean game attribute "Invincibility" ( have also tried to make it an actor attribute with similar problems)
integer game attribute "playerhealth"
rule
when player overlaps or collides with actor with tag "enemies" (have already verified that only proper actors have this tag)
AND
game attribute "invincible" is false
change attribute "playerhealth" to "playerhealth-1"
timer
for 2 seconds (have tried both run to completion and not run to completion)
change attribute "invincible" to true
otherwise
change attribute to false
Know, this simple formula alone just doesnt seem to work right. The basic problem I have is it seems to change the attribute once, making character invincible for 2 seconds after being hit the first time, but never again. I wont get into the other stuff I had piled on top, becuase that was causing other issues. I have pulled the other rules out to solve this problem first. Can anyone tell me what I am doing wrong?
Note:
I am using the health bar (playerhealth) described by tshirt booth in his youtube vid
please let me know if you need anymore info.
Comments
you mean change it *for* four seconds then *after* two seconds change the attribute back, right?
cheers