Skip to content

PlayMusic

Johnathon edited this page Jun 1, 2026 · 5 revisions

PlayMusic

Starts playback of a background music track by ID. Any currently playing music is replaced.

Syntax

PlayMusic(trackId)

Parameters

trackId
Integer
The ID of the music track to play.

Remarks

Music playback begins immediately when this opcode is executed. If music is already playing it will be replaced without fading out. To stop music without starting a new track use StopMusic. To fade out before switching tracks consider calling FadeOut before this opcode.

Examples

Play music track 23 during a world transition:

PlayMusic(23)

From Intro Sequence Script #1:

0x00, 0x17        // PushByte(23)
0x02, 0x31        // Step → PlayMusic

See Also

Applies To

Game Notes
Legacy of Goku 2 Supported

Clone this wiki locally