
Scriptname ShanaJumpingMEffectScript extends activemagiceffect; ---------- PropertiesActivator Property ShanaEmptyActivator Auto; ---------- VariablesObjectReference targetRefObjectReference jumpingPlatformFloat JumpingForce = 30.0Event OnEffectStart(Actor Target, Actor Caster) Debug.Trace(" OnEffectStart") targetRef = Target as ObjectReference if( !RegisterForAnimationEvent(targetRef, "JumpStandingStart") ) Debug.Trace(" cannot register JumpStandingStart") endif if ( ! RegisterForAnimationEvent(targetRef, "JumpDirectionalStart") ) Debug.Trace(" cannot register JumpDirectionalStart") endif if ( ! RegisterForAnimationEvent(targetRef, "JumpRoot") ) Debug.Trace(" cannot register JumpRoot") endif EndEventEvent OnAnimationEvent(ObjectReference akSource, string asEventName) Debug.Trace(" OnAnimationEvent") if (akSource == targetRef) if (asEventName == "JumpStandingStart") Debug.Trace(" Inside JumpStandingStart!") if(!jumpingPlatform) jumpingPlatform = targetRef.PlaceAtMe(ShanaEmptyActivator) endif jumpingPlatform.MoveTo(targetRef, 0.0, 0.0, -10.0 ) Debug.Trace(" Pusshhh") jumpingPlatform.PushActorAway( targetRef as Actor, JumpingForce ) elseif(asEventName == "JumpDirectionalStart") Debug.Trace(" Inside JumpDirectionalStart!") elseif(asEventName == "JumpRoot") Debug.Trace(" Inside JumpRoot!") endif endifEndEventEvent OnEffectFinish(Actor Target, Actor Caster) Debug.Trace(" OnEffectFinish") if(jumpingPlatform) jumpingPlatform.Disable() jumpingPlatform.Delete() endif UnregisterForAnimationEvent(targetRef, "JumpStandingStart") UnregisterForAnimationEvent(targetRef, "JumpDirectionalStart") UnregisterForAnimationEvent(targetRef, "JumpRoot")EndEvent