I have my magic effect and my spell, im just not sure where I should put the script. I want this to run as part of the magic effect. Do I put this in the script box under magic effect or should I first go to Papyrus manager-> new script? (Both cause my editor to stop responding.) My code is copied below.
ScriptName OMZmonitorScript extends ActiveMagicEffectImport UtilityInt Property OMZstage AutoEvent OnSpellCast(Form akSpell)Spell spellCast = akSpell as SpellIf spellCast == OMZspell While OMZstage <= 4 OMZstage += 1 ;WIP FX(OMZstage) Debug.notification(“OMZstage: ” + OMZstage) Utility.Wait(0.7) If OMZstage = 5 RegisterForCrosshairRef() Game.DisablePlayerControls(abMovement = false, abMenu = false) endIf endWhileendIfendEventEvent OnCrosshairRefChange(ObjectReference ref)UnregisterForCrosshairRef()Debug.notification(“Crosshair ref: “ + ref)If ref;WIPendIfendEventEvent OnEffectFinish(Actor akTarget, Actor akCaster)Game.EnablePlayerControls()If OMZstage <= 5OMZstage = 0endIfendEvent