3aq Posted July 7, 2019 Share Posted July 7, 2019 script is below. I plan to have the script attached to a spell. for ex. candlelight, assuming that it works it after the actor casts the spell, he/she will be forced to do the sAction that is filled in the properties field ex. "dance", or one of the events here https://www.creationkit.com/index.php?title=Animation_Events. problem is it doesn't seem at all to be working how I envisioned it. help and assistance is kindly appreciated, thank you =) scriptName _OnEffectDoAction extends activemagiceffect string property sAction auto Event OnEffectStart (Actor akTarget, Actor akCaster) debug.SendAnimationEvent(akCaster, sAction) debug.notification("doing action") endEvent Link to comment Share on other sites More sharing options...
maxarturo Posted July 7, 2019 Share Posted July 7, 2019 (edited) Using "OnEffectStart" will start the magic effect on the target, you need to use a different approach, like :Function Cast(ObjectReference akSource, ObjectReference akTarget = None) nativeORbool Function RegisterForAnimationEvent(ObjectReference akSender, string asEventName) native So that when the spell gets cast the animation will play on the caster intead of the target. * There are other ways you can also do this, the above is just examples. * Be sure to have a valuable animation event name in your string properties. Edited July 7, 2019 by maxarturo Link to comment Share on other sites More sharing options...
3aq Posted July 7, 2019 Author Share Posted July 7, 2019 even if the magic effect is using akCaster? (which should be self?) regardless, I'll keep what you said in mind, thank you maxarturo =) Link to comment Share on other sites More sharing options...
maxarturo Posted July 7, 2019 Share Posted July 7, 2019 (edited) Here is a portion of a "kind of similar" working script as yours, so you take an idea :spell thats makes the player and the target play a random animation. Idle Property akIdle0 Auto ... continuous spell Property akSpell Auto ... continuous Float DamAugment Event OnEffectStart(Actor akTarget, Actor akCaster) DamAugment = Game.GetPlayer().getAV("OneHanded*5") akSpell.Cast(Game.GetPlayer(), Game.GetPlayer()) Game.GetPlayer().MoveTo(aktarget) int random = Utility.RandomInt(0, 4) If Random == 0 Game.GetPlayer().PlayIdleWithTarget(akIdle0, akTarget) Utility.Wait(2) akTarget.DamageAV("Health", DamAugment) Actor RandomActor1 = Game.FindRandomActorFromRef(Game.GetPlayer(), 1000) AkSpell2.Cast(RandomActor1, RandomActor1) EndIf ... continuous Edited July 7, 2019 by maxarturo Link to comment Share on other sites More sharing options...
maxarturo Posted July 7, 2019 Share Posted July 7, 2019 Also try this :debug.SendAnimationEvent(ActorRef, sAction) Don't forget to add a ActorRef properties in your script and fill it with the actor casting the spell. Link to comment Share on other sites More sharing options...
Recommended Posts