Classes:MusicChanger
Note: Wait! Stop! You do not need to copy this actor's code into your project! Here's why:
|
Music changer | |||
---|---|---|---|
Actor type | Map spot | Game | (ZDoom) |
DoomEd Number | 14165 | Class Name | MusicChanger |
Classes: Actor → SectorAction → MusicChanger
The MusicChanger thing changes the music when triggered by the player entering the sector in which the thing is placed. The MUSINFO lump is used to associate music lumps to numbers in a given map. The music is changed to that associated to the number indicated by the changer's first parameter. A value of 0 for that parameter always correspond to the level's default music. The music changes only for the player who triggers the MusicChanger actor.
If the music lump is in a mod music format, the second parameter can be used to set the order.
This thing is mostly for compatibility with existing PrBoom+/Risen3D maps, as ACS offers more flexible ways to change music during play.
Use in a Doom-format map
In a map format where things cannot have parameters, DoomEd numbers 14101 to 14164 can be used instead: ZDoom will translate each such item in the map to a MusicChanger actor whose first parameter is equal to its number minus 14100. (So, 14101 will be interpreted as if it were 14165 with first parameter 1.)
DECORATE definition
ACTOR MusicChanger : SectorAction native {}