BotOwned Posted May 9, 2013 Share Posted May 9, 2013 Solution to problem: Spell Property DetectDead auto Event OnEffectStart(Actor akTarget, Actor akCaster) RegisterForUpdate(3.0) EndEvent Event OnUpdate() DetectDead.Cast(Game.GetPlayer()) EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) UnRegisterForUpdate() EndEvent Upon finding the rather elegant RegisterForUpdate(float x) function and OnUpdate() Event the rest fell into place. A little fiddling will do the rest. Thanks steve40 for the idea to cast a spell repeatedly every two seconds!! This still does not create a complete work around for my initial problem, though. Creating spells that affect corpses without directly aiming at them (i.e. by only having them in the area) seems to be quite difficult without using the "detect life" archetype... Any advice on that or examples of spells that affect corpses without aiming at them would be appreciated. That said, my current spell idea can be accomplished with no further input. Thank you all! Personally I use RegisterForSingleUpdate(float x) then RegisterForUpdate(float x) as it sometimes is possible for the update to become orphaned even with the best of scripts and using a single update only will allow the update to run out in case unregister fails. Link to comment Share on other sites More sharing options...
mathern Posted May 9, 2013 Author Share Posted May 9, 2013 Personally I use RegisterForSingleUpdate(float x) then RegisterForUpdate(float x) as it sometimes is possible for the update to become orphaned even with the best of scripts and using a single update only will allow the update to run out in case unregister fails. I'll take that into account. Thanks! Link to comment Share on other sites More sharing options...
steve40 Posted May 14, 2013 Share Posted May 14, 2013 (edited) It's safer to use RegisterForSingleUpdate:Spell Property DetectDead auto Event OnEffectStart(Actor akTarget, Actor akCaster) RegisterForSingleUpdate(3.0) EndEvent Event OnUpdate() RegisterForSingleUpdate(3.0) DetectDead.Cast(Game.GetPlayer()) EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) Game.GetPlayer().DispelSpell(DetectDead) EndEvent Edited May 14, 2013 by steve40 Link to comment Share on other sites More sharing options...
Recommended Posts