Jump to content

Animation Questions


Myst42

Recommended Posts

Posted

I wanted to make a spell play an animation.

The idea is to have this spell cast a quick ritual spell casting animation, without actually have to equip the spell in hands (It's a "voice" spell)

So, you can have weapons out, cast the spell, and still see the ritual animation

 

Questions are

1,-Anybody knows what's the name of the ritual spell casting animation?

Found that Debug.SendAnimationEvent(Caster, "AnimationName") should work in a script to make the character do the thing.

2.- The second question is about duration/speed.

In game, the animation sequence lasts usually as long as one specifies on the casting duration of the spell, but since this one wouldn't depend on such a thing, I wonder how can I define it.

A long ritual spell cast can last a lot, but I want a very fast one. (Actually trying to create an impression of quickly slamming the ground)

3.- My only worry is that the full ritual spell casting could consist on more than one animation, in which case, my question would be what are the names, how to control duration/speed, and if someone knows a good way to script the right sequence.

 

Since Sexlab and all it's mods depend so heavily on animation work, this should't be such a forbidden knowledge right? Anybody knows?

Posted

The "animation" you need are the actual "AnimEvents" that are associated to the animations.

You can open the Animation editor (the list of animations) in CK to get the names for about all possible idles.

 

Debug.sendAnimationEvent(actor, "AnimEvent") will work to have the actor play the animation. But be aware that if the actor decides to do another anim, your anim will be replaced if you don't stop the actor.

 

About the length, you need to use a timer to remove the animation when done, or play the next step.

 

Do something like:

function playAnim()
    debug.sendAnimationEvent(PlayerRef, "RitualSkull01")
    registerForSingleUpdate(3.6)
endFunction

event onUpdate()
    debug.sendAnimationEvent(PlayerRef, "IdleForceDefaultState")
endEvent
	
Posted
7 hours ago, CPU said:

The "animation" you need are the actual "AnimEvents" that are associated to the animations.

You can open the Animation editor (the list of animations) in CK to get the names for about all possible idles.

 

Debug.sendAnimationEvent(actor, "AnimEvent") will work to have the actor play the animation. But be aware that if the actor decides to do another anim, your anim will be replaced if you don't stop the actor.

 

About the length, you need to use a timer to remove the animation when done, or play the next step.

 

Do something like:


function playAnim()
    debug.sendAnimationEvent(PlayerRef, "RitualSkull01")
    registerForSingleUpdate(3.6)
endFunction

event onUpdate()
    debug.sendAnimationEvent(PlayerRef, "IdleForceDefaultState")
endEvent
	

Right... Thanks

Part of it worked

It gets stuck in the "ready to cast" final part of the animation though.

Only way to escape it was jump key.

Current script is

Scriptname AnimatedRitualSpellCastScript extends activemagiceffect  
Spell Property MagicAction Auto
Actor Property Caster Auto Hidden

Event OnEffectStart(Actor akTarget, Actor akCaster)
	Caster = akCaster
	Debug.SendAnimationEvent(Caster, "RitualSpellStart")
	RegisterForSingleUpdate(2)
EndEvent

Event OnUpdate()
	MagicAction.Cast(Caster)
	Debug.SendAnimationEvent(Caster, "IdleForceDefaultState")
EndEvent

I'm not sure if it failed because the second animation event is incorrect, or because it's missing the next part of the ritual casting sequence

I'll try to look for the next part and try different events.

Posted

Still no luck.

Nothing I found on the event list looking at the CK seemed to work. At least I tried all the names with "ritual" on it that suggested involvement.

I tried Animation Catcher to get the names of the animation events, but it's not doing anything for me.

 

Anyone knows of more ways of finding out how?

My script is currently

Scriptname AnimatedRitualSpellCastScript extends ActiveMagicEffect
; For casting spells with the ritual animation without needing to unequip weapons, or equip the spell in both hands.
Spell Property CallSpell Auto
Actor Caster

Event OnEffectStart(Actor akTarget, Actor akCaster)
	Caster = akCaster
	Debug.SendAnimationEvent(Caster, "RitualSpellStart")
	Utility.Wait(3.5)
	Debug.SendAnimationEvent(Caster, "RitualSpell_PreChargeOut")
	Utility.Wait(1.5)
	CallSpell.Cast(Caster)
	Debug.SendAnimationEvent(Caster, "RitualSpellOut")
EndEvent

Where "RitualSpellOut" is the only event I tried that can un-stuck the player without having to jump

"RitualSpellStart" obviously works, but it never progresses from the "ready to cast" final phase

 

Also, should this work, It might need something more specific, like register for animations, call them, and when triggered, casting the spell, that way, if animation gets interrupted, spell wont be casted.

Posted

Finally got AnimCatcher to work on an install

Problem is I found the only event appearing that could mean "casting ritual spell" is one I already used

 

This is the sequence of events AnimCatcher throws out when casting ritual spell

[11/11/2018 - 04:28:12PM] [Actor < (00000014)>]: BeginCastLeft
[11/11/2018 - 04:28:12PM] [Actor < (00000014)>]: DisableBumper
[11/11/2018 - 04:28:12PM] [Actor < (00000014)>]: tailCombatIdle
[11/11/2018 - 04:28:17PM] [Actor < (00000014)>]: MRh_SpellFire_Event
[11/11/2018 - 04:28:17PM] [Actor < (00000014)>]: MLh_SpellFire_Event
[11/11/2018 - 04:28:17PM] [Actor < (00000014)>]: RitualSpellOut
[11/11/2018 - 04:28:17PM] [Actor < (00000014)>]: EnableBumper
[11/11/2018 - 04:28:17PM] [Actor < (00000014)>]: tailCombatIdle

RitualSpellOut is the only one with the correct timing and uniqueness to be the one I want

So I used Debug.SendAnimationEvent(Caster, "RitualSpellOut")

AND IT DOES NOTHING in game

 

Does anybody at all know why is this happening and how to solve it?

One would think people are used to messing with animations in Sexlab. So why is it so difficult to trigger a simple vanilla animation?

 

Should I just give up and tag this as impossible?

Anyone???

 

Posted
On 11/7/2018 at 12:44 AM, Myst42 said:

Right... Thanks

Part of it worked

It gets stuck in the "ready to cast" final part of the animation though.

Only way to escape it was jump key.

Current script is


Scriptname AnimatedRitualSpellCastScript extends activemagiceffect  
Spell Property MagicAction Auto
Actor Property Caster Auto Hidden

Event OnEffectStart(Actor akTarget, Actor akCaster)
	Caster = akCaster
	Debug.SendAnimationEvent(Caster, "RitualSpellStart")
	RegisterForSingleUpdate(2)
EndEvent

Event OnUpdate()
	MagicAction.Cast(Caster)
	Debug.SendAnimationEvent(Caster, "IdleForceDefaultState")
EndEvent

I'm not sure if it failed because the second animation event is incorrect, or because it's missing the next part of the ritual casting sequence

I'll try to look for the next part and try different events.

 

Whether a Magiceffect update event is accepted or not depends on the Spell.
A Fire and Forgot Spell (without  duration) causes
after OnEffectStart instantly OnEffectFinish is reached.
The magic effect is stateless, so to speak

 

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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