Random Cd music

Discuss programming in the QuakeC language.
Post Reply
Cobalt
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA
Contact:

Random Cd music

Post by Cobalt »

I dont think anyone else has discovered this before. This code will let you override the .sounds float found in the map header that determine what cd track is to be played for a given map. Its written to write the newly selected track to the console via localcmd.

Code: Select all

/// placed in worldspawn ()
world.sounds = rint (random () * 16) + 2;
local string d;
 d = ftos (world.sounds);
localcmd ("echo SOUNDS: ");
localcmd (d);
localcmd ("\n");
I have been using it in my mod for a while now, and I like hearing different quake maps with different cd music. Others may not prefer this, and rather hear the traditional music played for the loaded map, but having played it for so long they all fit rather well together for the ultimate quake experience , IMO. Have fun !
Post Reply