2015.11.24
by Shaz
Introduction
This plugin allows you to run commands when a state is added or removed.
How to use
Add to your plugins folder (file name is irrelevant but I use StateAddRemoveCommands.js). There are no parameters to set or plugin commands to call.
Add the following to the State note box:
onadd: commandonremove: command to execute command when the state is added or removed.
command is any Javascript command that will be executed in the context of a battler (actor or enemy). Use this to refer to the current battler.
Examples
onadd: this.gainHp(50)- add 50 HP to the battler when the state is added
Code:
- deduct 100 MP from the battler when the state is removedonremove: this.gainMp(-100)Code:
- adds state 15 to the battler when the current state (the one with the note tag) is removedPluginonremove: this.addState(15)Download from pastebin
Credit
- Shaz
Terms
- free for use in commercial games
Notes
This is a port of my State Add/Remove Commands script for Ace. Some people previously reported issues with that script that I have not yet been able to reproduce or solve. If you encounter any issues please list them and I'll attempt to resolve.