Hi everyone,
I was trying to make a passive state that allowed the user to unleash a skill that had a 20% probability of instantly killing the target if said target had less than 2000 hp.
I tried to use the Weapon Unleash plugin by Yanfly.
However, using this code, nothing happens.
I guess it's because of the target variable, but I don't know how to make it equal to the chosen target.
How do I store the target Id so I can use it in this code?
Thanks in advance!
I was trying to make a passive state that allowed the user to unleash a skill that had a 20% probability of instantly killing the target if said target had less than 2000 hp.
I tried to use the Weapon Unleash plugin by Yanfly.
JavaScript:
<Custom Weapon Unleash: x>
if (target.hp < 2000) {
rate = 0.2;
} else {
rate = 0;
}
</Custom Weapon Unleash: x>
However, using this code, nothing happens.
I guess it's because of the target variable, but I don't know how to make it equal to the chosen target.
How do I store the target Id so I can use it in this code?
Thanks in advance!