Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Myst.Haruko

Question about music changer

Question

How does "music changer" work in zdoom/gzdoom udmf? I'm reading zdoom wiki, but some aspects are not clear for me. Also, what's the difference between "localsetmusic" and "setmusic" and where should I use it?

Share this post


Link to post

6 answers to this question

Recommended Posts

  • 0

Linedef. Like this, for example. First argument is the song, second argument is the volume...
 

script 1 (void)

{

LocalSetMusic("D_DOOM", 127);

}

Share this post


Link to post
  • 0
46 minutes ago, MysteriousHaruko said:

How does "music changer" work in zdoom/gzdoom udmf? I'm reading zdoom wiki, but some aspects are not clear for me.

Pretty much the same way they work in Risen3D and PrBoom+. You put a music changer thing in a sector, and when the player enters the sector with the music changer, the music changes. (After a small delay.) Of course you need to have made a MUSINFO lump first.

 

46 minutes ago, MysteriousHaruko said:

Also, what's the difference between "localsetmusic" and "setmusic" and where should I use it?

LocalSetMusic sets the music for the player who activates the script; SetMusic sets the music for every player. In single player there's no difference, except that SetMusic can be called from scripts that aren't activated by a player. (Well, LocalSetMusic can be used so as well, but since it only changes the music for the player who activated it, if no player activated it, no player will have a music change.) The script itself can be triggered by a linedef, or by a thing (things can have specials too!), or it can even be called from an actor's code, or from another script. There's a lot of ways to call a script, any will work.

 

 

Note that music changers and (Local)SetMusic are unrelated. You don't use music changers with SetMusic, nor do you use SetMusic with music changers. They're different ways to achieve the same thing.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×