Yep_WeaponUnleash - DualWield Check

Hi everyone!
I'm looking for a solution with this code. I'm using the Yep_WeaponUnleash plugin from Yanfly and I'd like to have 2 different animations according to the number of weapons equipped by the actor. So for that, I need to know how to check it 🙂

for now my Notetag looks like this :

<Custom Replace Attack>
if ("Check If a 2nd Weapon is equip") {
id = 2;
} else {
id = 1;
}
</Custom Replace Attack>

Anyone can tell me what I should put instead of the red part?

Thanks a lot ! And have a great making!
Hi everyone!
I'm looking for a solution with this code. I'm using the Yep_WeaponUnleash plugin from Yanfly and I'd like to have 2 different animations according to the number of weapons equipped by the actor. So for that, I need to know how to check it 🙂

for now my Notetag looks like this :

<Custom Replace Attack>
if ("Check If a 2nd Weapon is equip") {
id = 2;
} else {
id = 1;
}
</Custom Replace Attack>

Anyone can tell me what I should put instead of the red part?

Thanks a lot ! And have a great making!

user.isDualWield()
user.isDualWield()

I'm sorry but this checks if the actor is ABLE to dual wield, not if he's dual wielding. I believe the best way to check is if equip slot[1] item id has a value greater than 1 and is a weapon and not a shield/armor. I'm trying to tinker with the syntax myself because I have a dual wielder as well. I'll let you know what I find.
Ok I figured it out try this, it worked like a charm for me. IDK if yanfly plugins can use "a." for the attacker. try "user." if it doesn't work.

<Custom Replace Attack>
if (a.equips()[1] != null)
{
if (a.equips()[1].etypeId == 1)
{
id =2;
}
else
{
id =1;
}
}
else
{
id =1;
}
</Custom Replace Attack>


the reason it is so long and complicated is because if you have nothing equipped on the off hand/shield slot you'll get a null error. So you have to check for null before you check that the equipped item is equip type 1 (which is a weapon)
Work perfectly ! Thanks !

Original thread: https://forums.rpgmakerweb.com/threads/yep_weaponunleash-dualwield-check.92894/