+ -

09 - States

States are conditions such as dead, poisoned, burning, protected, etc. I will guide you on how to create states and how to inflict them on a character.

Slime bị sốt nằm đắp chăn, có khăn trên trán, phong cách dễ thương

Create Your First State

Create a state called Poison in the database. In the note section, enter <state common event: Common event name>, where the common event will be named Poison.


Now create a common event named Poison. We will use the condition this > 0. When Poison is inflicted on a target, if this condition returns true, it means the target is an event because it has an ID greater than 0. If the target inflicted with Poison has no ID, then it is the Player, and it will return false. We need to set up eventing for both cases, true and false.


You can do anything you want inside this common event, as long as it includes a conditional branch to check the target and a Remove State command so that Poison will automatically disappear.


Now, when you inflict a State, you will see it works for both events and the player. Take advantage of RPG Maker’s Traits to create other interesting states such as Buff, Debuff, etc.

English
Japanese