Commands: Audio & Animation
Section 4.B.2
These are keys which trigger sound effects, music files, or animations to play.
"playSE" => String
Plays a sound effect. Set as a string containing the file name of the desired sound effect found in the Audio/SE
folder.
"playCry" => Integer or Symbol
Plays the cry of a Pokemon. You can set this as an integer to play the cry of the Pokemon found at a specific battler index. For example, setting this to 1 would play the cry of the opponent's Pokemon at index 1. If you don't want to set specific battler indexes, you can also use the following symbols to more generally set which battler's cry should play: :Self
, :Ally
, :Ally2
, :Opposing
, :OpposingAlly
, :OpposingAlly2
.
Alternatively, you can instead set this to a species ID to play the cry of any species you want, even if that species isn't currently participating in battle.
"changeBGM" => String or Array
Changes the current BGM being played to a different track of your choosing. You can set this to a string containing the file name of that music track located in the Audio/BGM
folder. Alternatively, if you set this as an array, you can customize how this track will play. This array should contain the following data, in this order:
BGM file name (String)
Fade time (Integer). This will determine how long the current BGM will take to fade out (in seconds) before the new one begins playing.
Volume (Integer or nil). This will determine the volume level of the new BGM. You can omit this or set this to nil for the default volume.
Pitch (Integer or nil). This will determine the pitch level of the new BGM. You can omit this or set this to nil for the default pitch.
"endBGM" => Float
Fades out and ends the current BGM being played. This must be set to a float number, which just means any number with a decimal place. This number determines how long (in seconds) the currently playing music will fade out before it completely ends. For example, setting this to 1.5
will have the current music fade out for one and a half seconds before it ends. If you want the current music to end immediately without fading, you would just set this to 0.0
.
Once the music ends, the battle will continue in complete silence. There may be times where you may want this to happen, for some reason. However, if you want to restore music to the battle, you may use "resumeBGM" to restore the previous BGM, or "changeBGM" to begin playing a brand new track.
"pauseAndPlayBGM" => String
Pauses the current battle music and remembers its position before playing a new BGM. You can set this to a string containing the file name of that music track located in the Audio/BGM
folder to start playing that BGM.
"resumeBGM" => Boolean
Ends the current BGM, and resumes playing a previously paused BGM from its saved position. This won't do anything if there isn't any music track that has been previously paused with "pauseAndPlayBGM".
"playAnim" => String, Symbol, or Array
This can be used to make a certain animation play. If this is set to a String, this will attempt to play a common animation by that name (for example "StatUp" will play the stat increase animation). If this is set to a move ID Symbol, this will attempt to play the animation of that move. The targets for these animations will automatically be decided based on which Pokemon triggered the specific Trigger Key this command is located in. If you'd wish to manually set who the user and/or target of this animation should be, you may do so by setting this as an array which contains the following data in this order:
Animation ID (String or Symbol)
User ID (Integer or Symbol). This is the battler index of the user of the animation. If there is no user for this animation (something that happens independently of any particular battler, like Trick Room or weather), then a user isn't required. If you don't want to set specific battler indexes, you can also use the following symbols to more generally set which battler should be the user of the animation:
:Self
,:Ally
,:Ally2
,:Opposing
,:OpposingAlly
,:OpposingAlly2
.Target ID (Integer or Symbol). This is the battler index of the target of the animation. If there is no target for this animation (an animation that only affects the user, or happens independently of any particular battler), then a target isn't required. If you don't want to set specific battler indexes, you can also used the same symbols listed in the User ID section above to more generally set which battler should be the target of the animation.
Last updated