- Mar 2, 2012
- Reaction score
- First Language
- Primarily Uses
State Add/Remove Commands v1.01Introduction
This script lets you enter RGSS script commands to be run when a state is added or removed. Like calling a common event when a state is added, or setting one state to be replaced by another after a certain number of turns.
1.01 26 May 14 Fix issue with + sign in regular expressions
- Make something happen when a state is removed.
- Multiple commands may be run for a single state.
How to Use
Paste the script into a new slot below Materials.
In a state's note box, enter onadd: command or onremove: command, where command is any valid RGSS script command.
If a command requires more than will fit in the note box, allow it to wrap to the next line automatically - do NOT use the enter key to go to a new line.
Anything from onadd: or onremove: to the next manual line break will be executed.
You may have several onadd: or onremove: commands for a single state.
Get it here
If you want to call common event 8 when a state is added, enter the following as the note:
onremove: if hp_rate < 0.5; add_state(20); else; add_state(21); end;
onremove: add_state(hp_rate < 0.5 ? 20 : 21)
Credit and Thanks
Free to use in commercial games. Please give credit.
Last edited by a moderator: