:state=0:timerstart,state=1
:state=1,timergreater=60000:plraddhealth=-9999
Here apply that script to a trigger zone. I haven't tested it but it should work. By the way where it says 60000 that means 60 seconds so change that if you want a longer amount of time.
```````````````````````````````````````````````````````````````````
And since you want to learn how to script ill break down the script
:-separates conditions from actions(conditions always come first) and the line always starts with one
:state=0-this state has to be in every script because the engine looks for state=0
timerstart- this starts the timer
state=1-this tell it to move onto state=1 so.
:state=0:timerstart,state=1-this would tell the timer to start then move to state=1.
```````````````````````````````````````````````````````````````````
:state=1-another state that the engine has been told to move to(each state does not do a unique thing that other states don't except for state=0 because state=0 is what the engine looks for first so i could change the state=1 to state=10 and their would be no difference)
timergreater=-this is a condition(condition-ex-if something happened in this case if the timer is greater then an amount; timer must start with timerstart) it is measured in milliseconds so timergreater=1000 would be asking 'if the timer is greater then 1 second'
plraddhealth=this is an action (an action executes or does something) here it would add the amount of health to the player that we ask it to so if we had
:state=0:timerstart,state=1
:state=1,timergreater=1000:plraddhealth=10
that would add 10 health after 1 second. Or we could have
:state=0:timerstart,state=1
:state=1,timergreater=1000:plraddhealth=-10
that would take away 10 health after 1 second(because of the minus symbol
so here
:state=1,timergreater=60000:plraddhealth=-9999
after the state was asked to change to 1 it would wait till the timer was up and then take 9,999 health away from the player which would kill him.
so this code would
:state=0:timerstart,state=1
:state=1,timergreater=60000:plraddhealth=-9999
Tell the engine to start the timer and then go to state 1
it would move to state 1 and then wait till the timer is at 60 seconds once at 60 seconds it would then kill the player
]