- Joined
- Apr 19, 2018
- Messages
- 7
- Reaction score
- 3
- First Language
- English
- Primarily Uses
- RMMV
I'm trying to set up a skill that has a random chance of doing extra damage based on a variable number. I was able to get to this point without it just shutting down the entire sequence.
<damage formula>
value = a.atk * 4 - b.def * 2;
if ($gameVariables.value(87, 2)) {
value *= 3;
} else if ($gameVariables.value(87, 3)) {
value *= 5;
} else if ($gameVariables.value(87, 4)) {
value *= 7;
} else {
value *= 1;
}
</damage formula>
But now all it does is return a damage value of 0 every time I use the skill it's attached to.
<damage formula>
value = a.atk * 4 - b.def * 2;
if ($gameVariables.value(87, 2)) {
value *= 3;
} else if ($gameVariables.value(87, 3)) {
value *= 5;
} else if ($gameVariables.value(87, 4)) {
value *= 7;
} else {
value *= 1;
}
</damage formula>
But now all it does is return a damage value of 0 every time I use the skill it's attached to.

