Can I randomize the title music with SNDINFO?

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Can I randomize the title music with SNDINFO?

Re: Can I randomize the title music with SNDINFO?

by Gato303 » Tue Jan 08, 2019 10:24 am

Thanks! Had a bit of tough time creating a simple map on Slade3 cause of my inexperience and creating a WAD file containing the Titlemap inside the PK3. But finally I could figure it out and it's working, thanks :) :D

Re: Can I randomize the title music with SNDINFO?

by Gato303 » Sat Aug 18, 2018 8:11 pm

Apeirogon wrote:I know how do so using acs

Code: Select all

#include "zcommon.acs"

str songs_name[amount of songs] = { "song name 1", "song name 2", "song name 3", .....};
int pick_what_song_play;
        
script jukebox open
{
pick_what_song_play= random(0, amount of songs - 1);
SetMusic(songs_name[pick_what_song_play]);
}
That's cool, thanks for the script help.
Tho... how do you set the script to be executed when the Title Screen shows up?

Re: Can I randomize the title music with SNDINFO?

by Apeirogon » Thu Apr 12, 2018 8:21 am

I know how do so using acs

Code: Select all

#include "zcommon.acs"

str songs_name[amount of songs] = { "song name 1", "song name 2", "song name 3", .....};
int pick_what_song_play;
        
script jukebox open
{
pick_what_song_play= random(0, amount of songs - 1);
SetMusic(songs_name[pick_what_song_play]);
}

Re: Can I randomize the title music with SNDINFO?

by ZzZombo » Thu Apr 12, 2018 3:23 am

I remember back then trying to do the same only to find out that music can't be randomized. Maybe things have changed, but unlikely.

Can I randomize the title music with SNDINFO?

by SiFi270 » Tue Apr 10, 2018 1:08 am

I'm working on a mapinfo patch for the Serenity trilogy that can be loaded with all three wads and their music addons, but each one uses its own track for D_INTRO, D_INTER and D_VICTOR. After copying the relevant music files into the patch and replacing the D at the start of each with the first letter of the wad it's meant for, the intermission and victory music are easily handled with mapinfo, and for the title music I thought I'd use $musicalias and $random to play either Eternity's or Infinity's (since Serenity's is just the same as Doom's) but it doesn't seem to be that simple. Is there a workaround I can use to get the result I want?

Top