WFaS Coding Animation questions

Users who are viewing this thread

Yagababa

Recruit
Hey all, had a couple questions about animations in the module system:

1. Is it possible to force an animation/position until a trigger parameter is met? I coded a slot for the condition and that all works properly, but I'm not sure how to go about freezing the target in their current animation/preventing them from moving or attacking.

2. It looks like there's some sort of animation priority system built in already, so would it be possible to employ this in order to have an animation unable to be cancelled by attacking/blocking/jumping or anything other than being hit?

Thanks! This is the last missing piece to my next OSP which I'm very excited to release.
 
Solution
Hey! Sorry! I am the aforementioned! I have answers!

1. Not directly through the animation system, but you can make a series of animations that will look as if it is hanging on a single frame,.

So, the 'attack' adds a value into a slot that gets checked once per second, if there's a value, it checks to see if they are in any of the petrify animations, and if they are not it plays the first of this list
Python:
["petrify_1", acf_enforce_all, amf_play|amf_start_instantly|amf_priority_fall_from_horse|amf_continue_to_next, [1.0, "death", 0, 10, arf_blend_in_10]],
["petrify_2", acf_enforce_all, amf_play|amf_priority_fall_from_horse|amf_continue_to_next, [2.0, "death", 10, 15, arf_blend_in_10]],
["petrify_loop"...

Eärendil Ardamírë

Subforum Moderator
WBWF&SM&B
An animation is getting played (given it's a looped animation) until an animation with a higher priority is getting called for the agent. I have no deep knowledge about it, so you need to wait until @SupaNinjaMan or someone else shows up with a more detailed explanation.
 
Upvote 0
Hey! Sorry! I am the aforementioned! I have answers!

1. Not directly through the animation system, but you can make a series of animations that will look as if it is hanging on a single frame,.

So, the 'attack' adds a value into a slot that gets checked once per second, if there's a value, it checks to see if they are in any of the petrify animations, and if they are not it plays the first of this list
Python:
["petrify_1", acf_enforce_all, amf_play|amf_start_instantly|amf_priority_fall_from_horse|amf_continue_to_next, [1.0, "death", 0, 10, arf_blend_in_10]],
["petrify_2", acf_enforce_all, amf_play|amf_priority_fall_from_horse|amf_continue_to_next, [2.0, "death", 10, 15, arf_blend_in_10]],
["petrify_loop", acf_enforce_all, amf_priority_fall_from_horse|amf_keep, [5, "death", 15, 15, arf_cyclic]],
 
["petrify_break", acf_enforce_all, amf_play|amf_start_instantly|amf_priority_resurrection, [0.2, "death", 15, 1, arf_blend_in_10]],

Playing anim_pertify_1, which has a priority set to amf_priority_fall_from_horse will basically stop ALL animation outside of death, which is the intended look. She's Medusa and turns the enemy to stone. petrify_1 has a continue to next flag, so it swaps to _2 upon completion, which is just to make them look like they are slowing down further, before continuing to a loop that just holds frame 15 of the animation. Breaking the loop, since it has such a high priority, basically requires the character to die, or the petrification slot to hit zero, in which case, the character is told to play petrify_break, freeing them from the hold.

2. Animation priorities are hugely important and super easy to use! Essentially, every animation has a value, and only animations with an equal or greater value will be able overwrite the current action. In the above video the freeze animation has a priority set to fall_from_horse so death or higher is required to break them free. I use a different one for different attacks, such as setting one to 75 which overrides all bur hurt, basically playing over jump and everything else, but allowing the animation to be broken by being struck or dying. Animation Priorities are easy to do on the fly as you don't have to use a fancy hex value or anything, it's just any value 0 - 255. So, say, I had a system where a character would feign death, and played a real death animation. I would need to set an animation with a priority higher than that of death. Conveniently you could just write 96 as it is higher than 95.

For some more info, here are my repositories for a partially commented and explained animation file. They are not Native, of course, so take them with a grain of salt.
header_animations.py
module_animations.py
 
Upvote 0
Solution

Yagababa

Recruit
Hey! Sorry! I am the aforementioned! I have answers!

1. Not directly through the animation system, but you can make a series of animations that will look as if it is hanging on a single frame,.

So, the 'attack' adds a value into a slot that gets checked once per second, if there's a value, it checks to see if they are in any of the petrify animations, and if they are not it plays the first of this list
Python:
["petrify_1", acf_enforce_all, amf_play|amf_start_instantly|amf_priority_fall_from_horse|amf_continue_to_next, [1.0, "death", 0, 10, arf_blend_in_10]],
["petrify_2", acf_enforce_all, amf_play|amf_priority_fall_from_horse|amf_continue_to_next, [2.0, "death", 10, 15, arf_blend_in_10]],
["petrify_loop", acf_enforce_all, amf_priority_fall_from_horse|amf_keep, [5, "death", 15, 15, arf_cyclic]],
 
["petrify_break", acf_enforce_all, amf_play|amf_start_instantly|amf_priority_resurrection, [0.2, "death", 15, 1, arf_blend_in_10]],

Playing anim_pertify_1, which has a priority set to amf_priority_fall_from_horse will basically stop ALL animation outside of death, which is the intended look. She's Medusa and turns the enemy to stone. petrify_1 has a continue to next flag, so it swaps to _2 upon completion, which is just to make them look like they are slowing down further, before continuing to a loop that just holds frame 15 of the animation. Breaking the loop, since it has such a high priority, basically requires the character to die, or the petrification slot to hit zero, in which case, the character is told to play petrify_break, freeing them from the hold.

2. Animation priorities are hugely important and super easy to use! Essentially, every animation has a value, and only animations with an equal or greater value will be able overwrite the current action. In the above video the freeze animation has a priority set to fall_from_horse so death or higher is required to break them free. I use a different one for different attacks, such as setting one to 75 which overrides all bur hurt, basically playing over jump and everything else, but allowing the animation to be broken by being struck or dying. Animation Priorities are easy to do on the fly as you don't have to use a fancy hex value or anything, it's just any value 0 - 255. So, say, I had a system where a character would feign death, and played a real death animation. I would need to set an animation with a priority higher than that of death. Conveniently you could just write 96 as it is higher than 95.

For some more info, here are my repositories for a partially commented and explained animation file. They are not Native, of course, so take them with a grain of salt.
header_animations.py
module_animations.py
Thank! Gave me a couple ideas--I'll give it a shot.
 
Upvote 0
Top Bottom