RPG Maker Forums

State Add/Remove Commands

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:
onremove: this.gainMp(-100)
- deduct 100 MP from the battler when the state is removed

Code:
onremove: this.addState(15)
- adds state 15 to the battler when the current state (the one with the note tag) is removedPlugin

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.

Latest Threads

Latest Posts

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,450
Members
137,820
Latest member
georg09byron
Top