From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
  1. You do NOT need to copy that actor, since it is already defined.
  2. In fact, it's not just useless, it will cause problems.
  3. If you want to modify it, or use a modified version, using inheritance is the way to go.
  4. The actor definitions here are put on the wiki for reference purpose only. Learn from them, don't copy them.
Music changer
Actor type Map spot Game MiniZDoomLogoIcon.png (ZDoom)
DoomEd Number 14165 Class Name MusicChanger

Classes: ActorSectorActionMusicChanger

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 {}

See also