In the switch I put activateifused=0 ,this desactivated for the 0 value (set activate=0 to the hurtzone).
In the hurt zone, at start, set activate=1 to hurt.
When activate=0, go to state 2, that hurt only 3 seconds.
Sorry, I dont have a very good english for explain correctly.
Reactivable the hurtzone is simple
;Artificial Intelligence Script
;Header
desc = Deactivable Plr Hurt In Zone
;Triggers
:state=0:activate=1,state=1
:state=1,plrwithinzone=1,activated=1:plraddhealth=-1
:state=1,activated=0:timerstart,state=2
:state=2,plrwithinzone=1:plraddhealth=-1
:state=2,timergreater=3000:state=3
:state=3,activate=1:state=1
In state 3, If is activated go to state 1.
And the witch is.
;Artificial Intelligence Script
;Header
desc = Switch DeActivate (toggle off and on)
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecoretextpressentertouse.tga,hudname=useswitchprompt,hudhide=1,hudmake=display,state=10
:plrdistwithin=50:hudshow=useswitchprompt,hudfadeout=useswitchprompt
:state=10,plrdistwithin=50,plrusingaction=1:state=1,plrsound=$0,activateifused=0,alttexture=1
:state=1,plrusingaction=0:state=2
:state=2,plrdistwithin=50,plrusingaction=1:state=3,plrsound=$1,activateifused=1,alttexture=0
:state=3,plrusingaction=0:state=10
;End of Script
This switch are inverse. The normal switch, activated and desactivated. This first desactivated and later activate.
Do you know?