Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

How to Choose Weapon Motion While Keeping Weapon Image for Skills

MugenDraco

Villager
Xy$
0.21
Here's what I'm trying to do. I have all my Weapon Types set up, and certain Skills use the user's currently equipped weapon's animation instead of the generic cast animation. I've achieved this through Yanfly's Action Sequence Packs just fine. However, I'm trying to fine-tune it to get more control over the animation. I have Sword's attack animation set to swing, because most of the time, that's what I want. However, Swords and Daggers can also perform a Multi-Stab skill, and I'd like the animation for it to use the thrust motion instead of the swing. Yanfly's Weapon Animation plugin has notetags to choose different weapon images and motions, but for some reason Skills are the one area it doesn't work on. It works on Actors, Classes, Enemies, Weapons, Armors, and States, but not Skills. No matter what I've tried, my character always does the swing animation with the equipped weapon. I even ran across a post that said to add these Weapon Animation notetags to a State, and add that state to the user via Javascript, and then take the state off at the end of the Skill's script, but even that doesn't work. He still does the swing. How do I change what motion is used, but still use the equipped weapon's image sprite?
 

MugenDraco

Villager
Xy$
0.21
I thought I'd found a workaround using States, but I've learned no matter what, my character does the default skill motion (not the swing motion, as I previously thought), even while holding a sword. Here's the Yanfly Weapon Animation tags I have in State 12. Weapon 2 is a sword.

<Weapon Image: 2>
<Weapon Motion: thrust>

The Weapon Image part works perfectly. I can put whatever weapon in his hand that I want, regardless of what he has equipped. But the Weapon Motion part does nothing for some reason.

And here's the action sequence code I've got in the Multi-Stab Skill.

<Target Action>
Eval: user.addState(12);
motion thrust: user
perform action
Eval: user.removeState(12);
motion wait: user
action animation: target
wait for animation
action effect: target
death break
perform finish
</Target Action>

This should work, but no matter what, he does the skill motion. I've changed everything to swing and to missile as well, and he does the exact same motion no matter what.
 

MugenDraco

Villager
Xy$
0.21
FINALLY! I FIGURED IT OUT! The "perform action" line in the Action Sequence code was messing it up. I've tested it, and it doesn't even need the Weapon Animation notetags to work correctly. I could've sworn I'd done this before, but I guess not. Here's the code you need to add to a Skill if you want it to use the currently equipped weapon sprite, but change the attack motion from the weapon's default. Just change "thrust" to swing or missile depending on which one you need.

<Target Action>
perform start
wait for movement
motion thrust: user
motion wait: user
action animation: target
wait for animation
action effect: target
death break
perform finish
</Target Action>
 
Top