* Spawns an activator that turns to the desired direction and casts a spell that spawns an item with an explosion after colliding with something. Will this work with any surface or roof?
* Throws an object with Havok, register it for update and detect the change in movement vectors. I would have to match the distance traveled with the force applied for this one.
The idea is having a spell that enhances the player jumping skills, and while it kinda works outside, going through walls is hardly a feature...hehe. Here is the script now in case anyone is curious.
Spoiler
Scriptname ShanaJumpingMEffect2Script extends activemagiceffect; ---------- Properties; ---------- VariablesActor targetActorFloat JumpingHeight = 150.0Float JumpingSpeed = 200.0Float JumpingDirectionalMultiplier = 3.0Float OldXFloat OldYFloat NewXFloat NewYFloat VecX = 0.0Float VecY = 0.0Event OnEffectStart(Actor Target, Actor Caster) Debug.Trace(" OnEffectStart") targetActor = Target if ( ! RegisterForAnimationEvent(targetActor, "JumpUp") ) Debug.Trace(" cannot register JumpUp") endif OldX = targetActor.GetPositionX() OldY = targetActor.GetPositionY() RegisterForUpdate(0.2) EndEventEvent OnUpdate() NewX = targetActor.GetPositionX() NewY = targetActor.GetPositionY() VecX = JumpingDirectionalMultiplier * ( NewX - OldX ) VecY = JumpingDirectionalMultiplier * ( NewY - OldY ) OldX = NewX OldY = NewY Debug.Trace(" VecX , VecY : " + VecX + " , " + VecY )EndEventEvent OnAnimationEvent(ObjectReference akSource, string asEventName) Debug.Trace(" OnAnimationEvent asEventName: " + asEventName) if (asEventName == "JumpUp") if ( VecX != 0 || VecY !=0 ) akSource.TranslateTo(akSource.GetPositionX() + VecX, akSource.GetPositionY() + VecY, akSource.GetPositionZ() + JumpingHeight, 0, 0, 0, 4*JumpingSpeed) else akSource.TranslateTo(akSource.GetPositionX() + VecX, akSource.GetPositionY() + VecY, akSource.GetPositionZ() + JumpingHeight, 0, 0, 0, JumpingSpeed) endif endifEndEventEvent OnTranslationAlmostComplete() Debug.Trace(" OnTranslationAlmostComplete") targetActor.StopTranslation()EndEventEvent OnEffectFinish(Actor Target, Actor Caster) Debug.Trace(" OnEffectFinish") UnregisterForAnimationEvent(targetActor, "JumpUp") ; This always returns a runtime error...EndEventA side effect of this approach is that when the jumping animation ends and you are ending the translation somehow sometimes player's controls are enabled to cast spells and use weapons lol.


