how to restrict battle

I want to make an event in a battle when you have to use a specific move three times before the fight can progress or end. Is it possible to do this?
it would be possible with variables perhaps? *i have an idea but it seems ridiculously long*


use condition branch to count what buttons were pressed *which leads to the skill* and once that combination is achieved you add +1 to variable...once variable hits 3 you force battle off or whatever you want?


just an idea...i never actually tried that
it would be possible with variables perhaps? *i have an idea but it seems ridiculously long*


use condition branch to count what buttons were pressed *which leads to the skill* and once that combination is achieved you add +1 to variable...once variable hits 3 you force battle off or whatever you want?


just an idea...i never actually tried that

It's not the opponent. The player is the one who has to use a move 3 times
yes you can place what the player does in battle against certain enemies..


i just meant you use condition branch... IF button down is pressed followed by a if button a i pressed some sort of thing?
yes you can place what the player does in battle against certain enemies..


i just meant you use condition branch... IF button down is pressed followed by a if button a i pressed some sort of thing?

oooohhhh ok I think I get it. I'll try it and see if it works
I don't think tracking button presses to get to the skill would be very efficient. What if the player cancelled, or went back and forth between other skills before picking it?


The best way to do this would be to create a common event with a conditional branch for if "X" switch is on, and in that condition use control variables to add 1 to your "skill" variable. Make your skill in the database trigger this new common event. In the event that triggers your battle, turn the "X" switch on (this is to prevent the skill counter from triggering before this battle).


The enemy would have to be invincible when you start the battle, but once the variable has increased to however many times you need to use the skill, the monster can transform into something else or you can just end the battle there. I'm on my work computer so I can't look at all the specific commands at the moment, but if you need further elaboration just let me know.


EDIT: I played around with this a little when I got home and I devised a good way of doing it. This didn't actually require any events in the Troop settings, it's all handled in the common event. Basically the troop contains two instances of the same enemy - one is set to "immortal" and the other to "Appear Halfway" (and are placed right on top of each other). Once the skill count has been reached, it adds the Knockout state to the first enemy, and allows the second to appear. That way you can continue fighting after breaking his defenses, but if you would prefer, you can remove the second instance of the enemy and allow the battle to end there. If you want to see it working, I've attached the test project I was messing around with (the skill used is Cross Cut).

View attachment Skill Count Test.exe

Original thread: https://forums.rpgmakerweb.com/threads/how-to-restrict-battle.59053/