IF (AbilityUsed) == ?

I'm not sure if this isn't a thing or I'm just an idiot, but does anybody know how to make an IF statement that triggers when an actor uses a certain ability in a battle? Is there a plugin that does this or am I missing something obvious?
You could just turn on a switch in that skill's damage formula, then have a troop event page set to run the entire battle that is conditioned by that switch.  If the last command on that page is to turn the switch off, every time the skill is used, that event page will run.


Unfortunately if you want to check this on every battle, you'll need to add that event page to every troop, or use a plugin that either allows common events to run in battles or lets you copy a page from a 'base' troop onto every other troop without having to do it manually.  I believe both of those exist as MV plugins.
You could just turn on a switch in that skill's damage formula, then have a troop event page set to run the entire battle that is conditioned by that switch.  If the last command on that page is to turn the switch off, every time the skill is used, that event page will run.


Unfortunately if you want to check this on every battle, you'll need to add that event page to every troop, or use a plugin that either allows common events to run in battles or lets you copy a page from a 'base' troop onto every other troop without having to do it manually.  I believe both of those exist as MV plugins.

It never hit me that I could use js in there. Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/if-abilityused.70114/