How to count the critics made by a player and store them in a variable. and stop this count when it reaches a certain number
MV How to store critics in a variable
Javascript/Plugin SupportThe easiest way would be using this plugin:
www.yanfly.moe
Then create an empty state like this:
Then in note field paste this:
and give that state to your actors. Finally it should look like this:
Buffs & States Core (YEP) - Yanfly.moe Wiki
Then create an empty state like this:
Then in note field paste this:
Code:
<Custom Establish Effect>
if (target.result().critical && value > 0){
var limit = 10;
$gameVariables.setValue(1, $gameVariables.value(1) + 1);
if ($gameVariables.value(1) >= limit){
$gameVariables.setValue(1, limit);
}
}
</Custom Establish Effect>
and give that state to your actors. Finally it should look like this:
You can't imagine how much I needed that for my game. Thank you
You can't imagine how much I needed that for my game. Thank you
Original thread: https://forums.rpgmakerweb.com/threads/how-to-store-critics-in-a-variable.127886/