I'm trying to make something similar to persona 5, where if certain enemies are hit by certain elements, they enter into a knocked down state. I am using yanfly's buff and states script and here is what I have as a passive state in my enemies notebox.
<Custom Respond Effect>
Get the element ID of the the attack the target received.
var element = this.item().damage.elementId;
// Check if it is damage based and if the element matches the interrupting element.
if (this.isDamage() && element === 2) {
self.add_state(33)
}
</Custom Respond Effect>
However when my enemy is hit by the fire element(element 2), they don't enter into this state, i'm wondering if I did something wrong.
Here is the link to the script being used.
http://www.yanfly.moe/wiki/Buffs_&_States_Core_(YEP)
<Custom Respond Effect>
Get the element ID of the the attack the target received.
var element = this.item().damage.elementId;
// Check if it is damage based and if the element matches the interrupting element.
if (this.isDamage() && element === 2) {
self.add_state(33)
}
</Custom Respond Effect>
However when my enemy is hit by the fire element(element 2), they don't enter into this state, i'm wondering if I did something wrong.
Here is the link to the script being used.
http://www.yanfly.moe/wiki/Buffs_&_States_Core_(YEP)