CoNiGMa Posted March 8, 2018 Share Posted March 8, 2018 I need help with a script to get a spell to cast when a specific weapon is swung at a target. I've tried numerous different approaches and none have worked even though the scripts compile fine. What I want to do is have a weapon cast a ball of light on the target when the weapon is swung. Can anyone help me out here? I don't want it on a power attack, just a normal weapon swing. Link to comment Share on other sites More sharing options...
TheWormpie Posted March 8, 2018 Share Posted March 8, 2018 You can attach an enchantment with a scripted magic effect to the weapon. The magic effect script should be something like this: ScriptName myBallofLightScript extends ActiveMagicEffect spell property BallofLight auto Event OnEffectStart(Actor akTarget, Actor akCaster) BallofLight.cast(akCaster, akTarget) endEvent This won't take in account whether your attack is normal, a power attack or something entirely else though. Otherwise, you'd have to use something like OnAnimationEvent using one of the normal attack animations listed here, I'd guess. I don't have any experience in this matter though. 1 Link to comment Share on other sites More sharing options...
Elias555 Posted March 8, 2018 Share Posted March 8, 2018 Look into OnActorAction/RegisterForActorAction Link to comment Share on other sites More sharing options...
Recommended Posts