ironsightsffs Posted September 8, 2010 Share Posted September 8, 2010 I'm trying to figure out how to script an ability or constant-effect enchantment that triggers on and off under certain conditions. I really wanted a While loop, but apparently there are no loops in Oblivion scripting. I guess I will need to use the timer functions, but I had trouble figuring them out. I definitely don't want the script doing anything more than once per second in any case. One item I wanted to check an actor value once per second, if it's 1 make it 0, if it's 0 make it 1, and when it is unequipped set the av back to 0. The unequip thing I think I got figured out, but need help with the timer part. The second item or ability I want to trigger night eye when the light level goes under a certain threshold, and vice-versa. Thanks for looking. Link to comment Share on other sites More sharing options...
Hickory Posted September 8, 2010 Share Posted September 8, 2010 Scripting Tutorial: Creating a Simple Timer Link to comment Share on other sites More sharing options...
DavidBudreck Posted September 8, 2010 Share Posted September 8, 2010 The GameMode Block will run every 5 seonds or so; this does actually function as a While Loop, but you definitely need to build an exit strategy because the while loop will keep running forever. However, this should be suitable for most things. Link to comment Share on other sites More sharing options...
slygothmog Posted September 8, 2010 Share Posted September 8, 2010 The while loop script works perfect in Oblivion...I use them alot myself. If you want a very good example of one of these scripts to look at try this mod.http://www.tesnexus.com/downloads/file.php?id=30130 Link to comment Share on other sites More sharing options...
Recommended Posts