Hello everyone, I'm trying to create a state whose effect is to transform into another state after the target's actions are finished (in this case 3). Let's call the first state ID9 and the second state ID10. I don't want the target to have the chance to be hit by ID9 again, as this causes the turn counter to return to 3. How can I manage this?
I'm using YEP Buffs and states core for this. I mixed some codes that I found, and it kinda works, but that specific problem not that much.
These are the settings
Sorry if this is to simple to ask...But I have Zero knowledge of coding
I'm using YEP Buffs and states core for this. I mixed some codes that I found, and it kinda works, but that specific problem not that much.
JavaScript:
<Custom Apply Effect>
if (user._drowsy === undefined) {
user._drowsy = 3;
}
</Custom Apply Effect>
<Custom Turn End Effect>
if (user._drowsy !== undefined) {
user._drowsy--;
if (user._drowsy <= 0) {
user.removeState(9);
user.addState(10);
delete user._drowsy;
}
}
</Custom Turn End Effect>
<Custom Remove Effect>
delete user._drowsy;
</Custom Remove Effect>
These are the settings
Sorry if this is to simple to ask...But I have Zero knowledge of coding