For a toggled power when you equip the enchanted item, you would need to have a scripted magic effect that adds and removes a lesser power when the effect starts and the effect ends.
Scriptname SomeEnchMagicEffectScript extends ActiveMagicEffectSpell property CoolPower autoEvent OnEffectStart(Actor akTarget, Actor akCaster) akTarget.AddSpell(CoolPower)EndEventEvent OnEffectFinish(Actor akTarget, Actor akCaster) akTarget.RemoveSpell(CoolPower)EndEvent
Function ToggleSpell(Spell MySpell, Actor MyActor) if !(MyActor.RemoveSpell(MySpell)) MyActor.AddSpell(MySpell) endifEndFunction
Function ToggleSpell(Spell MySpell, Actor MyActor) if !(MyActor.RemoveSpell(MySpell)) MyActor.AddSpell(MySpell) endifEndFunction
if myactor.removespell(myspell) != true
if myactor.removespell(myspell)
Scriptname SomeEnchMagicEffectScript extends ActiveMagicEffectSpell property CoolPower autoEvent OnEffectStart(Actor akTarget, Actor akCaster) akTarget.AddSpell(CoolPower)EndEventEvent OnEffectFinish(Actor akTarget, Actor akCaster) akTarget.RemoveSpell(CoolPower)EndEvent
Scriptname fg109TestMEScript extends ActiveMagicEffect Float Property Speed = 100.0 AutoEvent OnEffectStart(Actor akTarget, Actor akCaster) SmoothCurve(akTarget, akCaster)EndEventFunction SmoothCurve(ObjectReference A, ObjectReference B) Float AngleZ = A.GetHeadingAngle(B) if (AngleZ < -45) Float OffsetAngle = -45.0 - AngleZ AngleZ = -45.0 A.SetAngle(0, 0, A.GetAngleZ() + OffsetAngle) elseif (AngleZ > 45) Float OffsetAngle = 45.0 - AngleZ AngleZ = 45.0 A.SetAngle(0, 0, A.GetAngleZ() + OffsetAngle) endif Float DistanceXY = Math.sqrt((B.X - A.X) * (B.X - A.X) + (B.Y - A.Y) * (B.Y - A.Y)) Float SplineMagnitude = DistanceXY / Math.Cos(AngleZ) Float AngleZEnd = A.GetAngleZ() + (A.GetHeadingAngle(B) * 2) A.SplineTranslateTo(B.X, B.Y, B.Z, 0, 0, AngleZEnd, Math.Abs(SplineMagnitude) * 0.75, Speed)EndFunction