Hi, im trying to create a dice roll system for battle. Where you roll 6 sided dice, 4 sided dice, 10, 12, and 20. The dice rolls are multipliers to damage and defense. The code below works but im having trouble figuring out how to display in messagebox, "You" and "Monster" when its your turn or monsters turn, right now, both you and monster get "You" and during monsters turn, you are "Monster", how would i code it so that, They switch back and forth, so that Monster is Monster's turn, and You is actors turn? I'm using yanfly's skill core for damage evaluation since its the only one i know that allows you to enter javascript and script calls.
<Pre-Damage Eval>
x = (Math.floor(Math.randomInt(6) + 1));
$gameVariables[28, x];
y = (Math.floor(Math.randomInt(6) + 1));
$gameVariables[29, y];
$gameMessage.add("You rolled " + $gameVariables.value(28));
$gameMessage.add("Monster rolled " + $gameVariables.value(29));
</Pre-Damage Eval>
<Pre-Damage Eval>
x = (Math.floor(Math.randomInt(6) + 1));
$gameVariables[28, x];
y = (Math.floor(Math.randomInt(6) + 1));
$gameVariables[29, y];
$gameMessage.add("You rolled " + $gameVariables.value(28));
$gameMessage.add("Monster rolled " + $gameVariables.value(29));
</Pre-Damage Eval>