Jump to content

Problem to assign an idle animation to a magic effect


Recommended Posts

Hey there,

 

i want to create a standalone version of the "whirlwind sprint shout" as a lesser power and just can´t get it to work. The respective animation just doesn´t trigger.

I´ve found out, that this shout is created in a very strange manor by using idle animations that play under certain conditions- but i can´t figure out, how these idle animations connect to the respective magic effects. It seems like there is no connection at all. After trying for hours, i gave up and searched google for a scripted alternative to do this and i found one here on the nexus. But this script, which i´ve attached to my custom magic effect doesn´t trigger the animation either. I really could use some help with this...

 

This is the the script source i used:

 

Scriptname AnimationScript extends ActiveMagicEffect

Actor Property SpellSubject Auto


Event OnEffectStart(Actor akTarget, Actor akCaster)

SpellSubject = akTarget
RegisterForSingleUpdate(1.0) ;we will run updates every second, this should be fast enough whilst not being too fast/expensive.

EndEvent

Event OnUpdate()

RegisterForSingleUpdate(1.0)

Debug.SendAnimationEvent(SpellSubject,"ShoutSprintLongestStart")
UnregisterForUpdate() ;we don't want to send this multiple times.

EndEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster) ;when they die or spell duration expires.

UnregisterForUpdate()

EndEvent

 

 

Hope someone has an idea

Link to comment
Share on other sites

If the spell doesn't have a duration the "OnUpdate()" event will never fire.

If the spell has a duration and the duration is less or equal to the "RegisterForSingleUpdate()", the "OnUpdate()" event will again never fire.


* This does not need an "OnUpdate()" event to work.



Actor SpellSubject

Event OnEffectStart(Actor akTarget, Actor akCaster)
SpellSubject = akTarget
Debug.SendAnimationEvent(SpellSubject,"ShoutSprintLongestStart")
EndEvent



The "RegisterForSingleUpdate()" / "OnUpdate()" event can be use on an "OnEffectStart"/"OnEffectFinish" event ONLY under certain circumstances.

Once a Magic Effect finishes "OnEffectFinish", that can be from a few milliseconds to seconds, any 'Register' functions will automatically be 'Unregistered'.


* The way that is scripted the 'Animation' will play on the "Target" and not on the "Caster"/Player.


Have a happy modding.

Edited by maxarturo
Link to comment
Share on other sites

What does this spell supposed to do ?.

It's a spell that runs on the caster / self / player ?.

It's a spell that it's fire towards a target ?.

Is your Magic Effect properly set up for what you intend to do with it ?.


* Just as a note: i just copy the name of the animation from the script you posted, i don't even know if that animation name is valid, or if it is an animation or an idle.

Edited by maxarturo
Link to comment
Share on other sites

Well, actually i just want a lesser power version of the whirlwind sprint shout that can be used normally by the player- being able to sprint from A to B in a split second with the respective animation. I do not have any clue how to correctly set this up, as this shout is so unusually implemented.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...