haganinc Posted March 8, 2012 Share Posted March 8, 2012 So doing some testing with scripting magic effects, and I can't seem to get the OnUpdate to work as I would expect. Basically here is my script that is attached to an Fire and Forget aimed spell: Scriptname Test extends activemagiceffect Event OnEffectStart(Actor akTarget, Actor akCaster) registerForUpdate(1) endEvent Event OnUpdate() doSomeStuff() endEvent So I would expect stuff to happen every second, however instead stuff only happens once and then never again. Any idea what I might be doing wrong? Link to comment Share on other sites More sharing options...
fg109 Posted March 8, 2012 Share Posted March 8, 2012 What's the duration of your spell? Link to comment Share on other sites More sharing options...
haganinc Posted March 8, 2012 Author Share Posted March 8, 2012 (edited) I have tried anything from 5 seconds to 5 minutes, doesn't seem to affect the problem I am having. The value I am changing is the duration of the magic effect that is attached to the spell. Is there anywhere else I should be changing to increase the duration? I read that when a spell is finished it unregisters the update, but that magic effect duration was the only place I saw where I could increase the duration unless I missed something. Edited March 8, 2012 by haganinc Link to comment Share on other sites More sharing options...
fg109 Posted March 8, 2012 Share Posted March 8, 2012 Do you have an UnregisterForUpdate() misfiring in your script somewhere? Link to comment Share on other sites More sharing options...
haganinc Posted March 9, 2012 Author Share Posted March 9, 2012 Ok, I figured it out. Apparently my mod wasn't being saved properly so in game my spell kept reverting back to a version that has only a 1 second duration. Link to comment Share on other sites More sharing options...
Recommended Posts