Play Music
The simplest instruction in the whole part: a tune's name and one flag
easyYou need: Sound, What a world processor is
playmusic "game1" true| Field | What is in it |
|---|---|
| first | the tune’s name as a string |
| second | whether to interrupt what is playing now |
The names are the same as the game’s music files: game1, game3, boss1, fine. The
editor’s picker lists them all.
Interrupt or wait
Section titled “Interrupt or wait”With true the music starts immediately, cutting off the current one: that is how a turning
point in a script is marked — a boss arrived, a siege began.
With false it joins the queue and plays when the current one ends: that is how the background
is changed between tasks, without jarring the player.
Unofficial fan project, not affiliated with Anuke. Mindustry sprites, fonts and translations © Anuke, used under GPL-3.0; Fira Code under OFL-1.1. Site code is GPL-3.0.