Skill used 3x's - End the battle

I am trying to setup a "training fight" in which the pc uses a skill 3x's in battle against a trainer and then the fight ends as the player has learned the skill. I have a rough idea on how to set everything up within the battle event and using a counter variable, but my biggest sticking point is tracking the actual skill use. How do I identify/know when the skill was used? For references sake the skill number is 61.
Are they allowed to use anything else? If they're only supposed to use that skill, you can put a state on them that seals all other skills, then it'll just be a troop event on round 3.

If the player is allowed to use other skills but the condition for ending the battle is using that skill 3 times, I would give them an alternate version of the skill that increments a variable inside the damage formula.

Then your troop event can check for that variable to be 3, and you remove that version of the skill and give them the proper one.
Are they allowed to use anything else? If they're only supposed to use that skill, you can put a state on them that seals all other skills, then it'll just be a troop event on round 3.

If the player is allowed to use other skills but the condition for ending the battle is using that skill 3 times, I would give them an alternate version of the skill that increments a variable inside the damage formula.

Then your troop event can check for that variable to be 3, and you remove that version of the skill and give them the proper one.
The player is allowed to use other skills. That said is there an example somewhere I can reference on using increments a variable inside the damage formula? That's a new thought process I am unfamiliar with.
If you hover your mouse over the damage formula box, there are a number of variables listed for you; game variables is one.

You might like to read through this:

Basically, you can do something like
Code:
v[69]++; your regular damage formula
then you can use a troop event to check the value of variable 69.

Just make sure you set the variable to 0 before starting the tutorial combat.
This is great - thank you for the information!
Odd - I am running into an issue where it's not counting up. Any thoughts on this? It seems to be running through the Battle Event code fine?


Variable:
1709855991635.png


Skill 61 - Dmg Formula:
1709856095055.png

Battle Event is setup so that if it doesn't meet the criteria and exit the battle then it shows the count of how many times the skill is being used.
1709855954961.png
Any thoughts on this?
set a troop event to make that variable's value 0 at turn 0. incrementing variables that way requires them to be initialized first
For crying out loud, I forgot to set the Variable to 0 as you called out. /sigh... It's working now - thank you for your help!!

Original thread: https://forums.rpgmakerweb.com/threads/skill-used-3xs-end-the-battle.166531/