I'm using Yanfly's Action Sequences, and I'm currently trying to put in a conditional script into one of the sequences.
The idea is: when you take the Attack action, the character moves up to the target to attack, UNLESS the attacker is using a crossbow type weapon. The crossbow's weapon type ID is 3, so I came up with this script:
I'm not getting something right, cause the action sequence is skipping everything between if-end no matter the weapon type. I also tried the following statements:
But I still can't get it right. I'm not sure what I'm getting wrong here, I'm still kind of an amateur coder.
The idea is: when you take the Attack action, the character moves up to the target to attack, UNLESS the attacker is using a crossbow type weapon. The crossbow's weapon type ID is 3, so I came up with this script:
Code:
<whole action>
if (a.weapons()[0].wtypeId : 0) != 3
move user: target, front, 20
wait for movement
end
</whole action>
I'm not getting something right, cause the action sequence is skipping everything between if-end no matter the weapon type. I also tried the following statements:
Code:
if ((a.weapons()[0].wtypeId : 0) != 3)
if (a.weapons()[0] ? a.weapons()[0].wtypeId : 0) != 3
if ((a.weapons()[0] ? a.weapons()[0].wtypeId : 0) != 3)
But I still can't get it right. I'm not sure what I'm getting wrong here, I'm still kind of an amateur coder.