xxxCYNICxxx Posted May 23, 2020 Share Posted May 23, 2020 (edited) Hello. I have made custom spell to trigger paired animation (pa_Huga). So I wrote simple script which should trigger this animation when player cast spell on target. It seems like script is working as intented, but I have small issue I want to get rid off. After animation is played my character cannot use spells untill i reequip weapon\spell. I've checked wiki page and there is note that this is expected behaivour and should be fixed, but I am noob at scripting and can't wrap my head how to fix this. So can someone explain to the noob what should I do in my script or in CK to fix my problem. Here is my script: Scriptname _PairedHug extends ActiveMagicEffect Idle Property pa_HUGa Auto Event OnEffectStart(Actor akTarget, Actor akCaster) akTarget.PlayIdleWithTarget(pa_HUGa, akCaster) Game.GetPlayer().DrawWeapon() Endevent Thanks in advance. Edited May 23, 2020 by xxxCYNICxxx Link to comment Share on other sites More sharing options...
dylbill Posted May 23, 2020 Share Posted May 23, 2020 I would put a wait between the PlayIdleWithTarget and the DrawWeapon function. Make the wait however many seconds the Idle lasts. Scriptname _PairedHug extends ActiveMagicEffect Idle Property pa_HUGa Auto Event OnEffectStart(Actor akTarget, Actor akCaster) akTarget.PlayIdleWithTarget(pa_HUGa, akCaster) Utility.Wait(3) Game.GetPlayer().DrawWeapon() Endevent Link to comment Share on other sites More sharing options...
xxxCYNICxxx Posted May 26, 2020 Author Share Posted May 26, 2020 I would put a wait between the PlayIdleWithTarget and the DrawWeapon function. Make the wait however many seconds the Idle lasts. Scriptname _PairedHug extends ActiveMagicEffect Idle Property pa_HUGa Auto Event OnEffectStart(Actor akTarget, Actor akCaster) akTarget.PlayIdleWithTarget(pa_HUGa, akCaster) Utility.Wait(3) Game.GetPlayer().DrawWeapon() Endevent Thank you very much for help. I will try it today. Link to comment Share on other sites More sharing options...
xxxCYNICxxx Posted May 28, 2020 Author Share Posted May 28, 2020 Guys i have one more question. What should I add to my script to make animation fire only when NPC is turned back to the player? I think it's something about "getangle" command. But how exactly should look this piece of code? Sorry for noobish questions. This is my very first script in papyrus. :mellow: Link to comment Share on other sites More sharing options...
Recommended Posts