Commands: Utilities

Section 4.B.3

These are keys which trigger general utilities, such as creating a pause between actions, delaying an action until a certain point, or setting specific switches or variables.

"setBattler" => Integer or Symbol

Changes the battler to be used as the focus of many of the commands listed below and in other sections. By default, the battler that these commands apply to is determined by whichever battler triggered the initial Trigger Key. For example, if the Trigger Key is "UserDealtDamage", then the default battler is whoever is the user of the move that just dealt damage. With this key, however, you can manually set which battler should be the focus, regardless of what the default battler may be.

To do this, you may simply set this to a battler index to have that battler be flagged as the new focus. Alternatively, you may also use one of the following symbols if you want to more generally assign which battler should be the new focus: :Self, :Ally, :Ally2, :Opposing, :OpposingAlly, :OpposingAlly2.

"wait" => Integer or Float

Freezes the battle scene and prevents anything from happening for a set number of seconds. You can enter a float number such as 0.5 for a half second pause.

"pause" => Integer or Float

Creates a delay that pauses any further actions from occurring for a set number of seconds. You can enter a float number such as 0.5 for a half second pause.

"ignoreUntil" => String or Array

Prevents any other keys below this one from activating until a specified Trigger Key has been triggered. For example, if you set this to "BattlerFainted_foe", then no other keys in this hash will be able to trigger until one of the foe's Pokemon have fainted to trigger that key. Alternatively, you can set this to an array containing multiple Trigger Keys, and no other keys in this hash will be able to trigger until at least one of the Trigger Keys in this array have been triggered.

"ignoreAfter" => String or Array

Prevents any other keys below this one from activating after a specified Trigger Key has been triggered. For example, if you set this to "BattlerFainted_foe", then no other keys in this hash will be able to trigger after one of the foe's Pokemon have fainted to trigger that key. Alternatively, you can set this to an array containing multiple Trigger Keys, and no other keys in this hash will be able to trigger once any of the Trigger Keys in this array have been triggered.

"toggleSwitch" => Integer

Toggles a particular game switch off or on. The integer set here determines which game switch to toggle. For example, if this is set to 75, then game switch 75 will be toggled on. If game switch 75 is already on, then it will be turned off instead.

"setVariable" => Integer or Array

Sets the default value of the midbattle variable to whatever number the set integer is. If set as an array of integers, a random value will be selected instead.

"addVariable" => Integer or Array

Adds to the value of the midbattle variable that is checked for by certain Trigger Keys. Whatever integer is set here will be added to the cumulative total of this variable. If you want to subtract an amount from this variable, set this to a negative number instead.

If set as an array of integers, a random value from this array will be selected to add to the variable's value.

"multVariable" => Integer or Float

Multiplies the value of the midbattle variable that is checked by certain Trigger Keys by whatever integer is set. If you want to divide the value of the this variable instead, then set this to a float number like 0.5 to divide the value of the variable by half (rounded).

Last updated