I'm making a tank character for my game and I'm using one of Yanfly's tips and tricks skills called Hexdrinker. The skills makes it so if the user's health falls below a certain point that user is given a shield. However I wanted to change this for my game so if her health fall below 30% her party are given shields instead. I don't understand scripting at all and I need help trying to figure this out. The community has been really helpful so far with answering my noobish questions and I would go on to say the rpg maker community is the most supportive community I've come across.
I apologize in advanced if this is in the wrong thread or if I'm breaking any forum rules. I don't post on the forums that often.
The script is below. Thanks in advanced
<Custom Regenerate Effect>
// Default the Hexdrinker's cooldown to 0.
user._hexdrinkerCooldown = user._hexdrinkerCooldown || 0;
// If the Hexdrinker's cooldown is greater than 0...
if (user._hexdrinkerCooldown > 0) {
// Then decrease its cooldown.
user._hexdrinkerCooldown -= 1;
}
</Custom Regenerate Effect>
<Custom Respond Effect>
// Default the Hexdrinker's cooldown to 0.
target._hexdrinkerCooldown = target._hexdrinkerCooldown || 0;
// Check if the action dealt magical HP damage and if the target's current HP rate is under 30%. Also check if there is no cooldown on the Hexdrinker.
if (this.isMagical() && target.result().hpDamage > 0 && target.hpRate() <= 0.30 && target.hp >= 0 && target._hexdrinkerCooldown <= 0) {
// The amount of points for the absorption barrier.
var barrier = 250;
// How many turns the barrier will last.
var turns = 3;
// Make the target gain barrier points for those turns.
target.gainBarrier(barrier, turns);
// Set the cooldown for the Hexdrinker.
target._hexdrinkerCooldown = 5;
// Play an animation on the target.
target.startAnimation(53);
}
</Custom Respond Effect>
I apologize in advanced if this is in the wrong thread or if I'm breaking any forum rules. I don't post on the forums that often.
The script is below. Thanks in advanced
<Custom Regenerate Effect>
// Default the Hexdrinker's cooldown to 0.
user._hexdrinkerCooldown = user._hexdrinkerCooldown || 0;
// If the Hexdrinker's cooldown is greater than 0...
if (user._hexdrinkerCooldown > 0) {
// Then decrease its cooldown.
user._hexdrinkerCooldown -= 1;
}
</Custom Regenerate Effect>
<Custom Respond Effect>
// Default the Hexdrinker's cooldown to 0.
target._hexdrinkerCooldown = target._hexdrinkerCooldown || 0;
// Check if the action dealt magical HP damage and if the target's current HP rate is under 30%. Also check if there is no cooldown on the Hexdrinker.
if (this.isMagical() && target.result().hpDamage > 0 && target.hpRate() <= 0.30 && target.hp >= 0 && target._hexdrinkerCooldown <= 0) {
// The amount of points for the absorption barrier.
var barrier = 250;
// How many turns the barrier will last.
var turns = 3;
// Make the target gain barrier points for those turns.
target.gainBarrier(barrier, turns);
// Set the cooldown for the Hexdrinker.
target._hexdrinkerCooldown = 5;
// Play an animation on the target.
target.startAnimation(53);
}
</Custom Respond Effect>