I'm new at trying to write my own scripts for guns and whatnot I've modded into New Vegas, but basing a script on a floating timer and the getsecondspassed function seems to be beyond me.
I'm trying to build a two-tier script, and can't figure out how to word it in the GECK to get the script to loop as opposed to running once-through. Hopefully it's something simple I'm missing.
The script as it stands:
float timer
short wakeup
Begin ScriptEffectStart
modav paralysis 1
if timer < 3
set timer to timer + getsecondspassed
else
Set wakeup to GetRandomPercent
set timer to 0
if wakeup > 50
modav paralysis 0
endif
endif
End
I'm sure there are errors in the way it's written, but the GECK finally allowed me to save that mangled script and so I've been using it as a starting point to actually get the script to work right in-game.
I've linked an ammo to this script, in the hopes that whenever I hit something with it, they'll be immediately paralyzed. Every 3 seconds, the script would roll to see if they woke up from the paralysis.
Are there looping commands I don't know to add? How should I be writing the two 'if' phrases to make sure one follows the other only after the first has been met?
Any advice would be much appreciated.
