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.
Skill used 3x's - End the battle
RPG Maker MZ SupportAre 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.
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:
forums.rpgmakerweb.com
Basically, you can do something like
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.
You might like to read through this:
Damage Formulas 101
Please note: A discussion has already been started about different things you can do with these formulas so please direct those comments and question to the appropriate thread. https://forums.rpgmakerweb.com/index.php?threads/rmmv-damage-formula-ideas-and-help.47099/ A link to the list of...
forums.rpgmakerweb.com
Basically, you can do something like
Code:
v[69]++; your regular damage formula
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:
Skill 61 - Dmg Formula:
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.
Variable:
Skill 61 - Dmg Formula:
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.
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/