Jump to content

Need scripting help


ironsightsffs

Recommended Posts

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...