I would like to set myVar or glbVar to 0 after 5 mins without interfering following script. The script belongs to a Magic Effect/Spell which the player can cast every time.
Event OnEffectFinish(Actor akTarget, Actor akCaster) myVar = glbVar.getValue() if myVar == 1 ;do something myVar = 0 else ;do something myVar = 1 endIfglbVar.SetValue(myVar)endEvent
If I cast once, the second part of the if statement will be executed and the variables are set to 1. With the second cast the variables are set to 0 while the first part is running.
How can I solve this? If the variable is set to 1, that after 5 mins the variable will be set to 0. But if the player casts one more time before the 5 min are over, the variable is set to 0 anyway, so the first timer must be stopped somehow.
I hope I was clearly enough, English is not my mother language.
Thanks for any help

