morogoth35 Posted August 14, 2017 Share Posted August 14, 2017 I am trying to find the right event to use that will detect when any enemy is hit by a lightning bolt. This is the script I tried: Scriptname EyeOfTheStormFixedScript extends activemagiceffect Event OnEffectStart(Actor akTarget, Actor akCaster) If (akCaster == Game.GetPlayer()) Debug.Notification("You hit the enemy with lightning bolt.") EndIf EndEvent However that does nothing. I attached that script to the lightning bolt magic effect. Link to comment Share on other sites More sharing options...
Lisselli Posted August 15, 2017 Share Posted August 15, 2017 (edited) Nevermind. Someone with a better answer will come along. If ever. Edited August 15, 2017 by Lisselli Link to comment Share on other sites More sharing options...
powerofthree Posted August 16, 2017 Share Posted August 16, 2017 Follow this tutorial to dynamically attach scripts to nearby actors, and add a script extending ReferenceAlias or MagicEffect depending on which method you picked. Add this to the script MagicEffect Property LightningBolt Auto ;fill this property with actual lightning bolt magiceffect Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect) If akEffect == LightningBolt Debug.Notification("hit with bolt") EndIF EndEvent Or you could use Event OnHit I guess. Link to comment Share on other sites More sharing options...
Recommended Posts