View Full Version : cdsoundtrack.cog?
ORJ_JoS
04-07-2005, 06:27 PM
Heya massassians!
I remember seeing a cog that enabled you to play a music track (or the whole cd maybe) from the JK cd here on massassi... but I cant find it anywhere, not on any other sites either.
I want my MP level to have some music from the JK cd... does anyone have a cog that does that?
Thx,
Jos
darthslaw
04-07-2005, 08:33 PM
Tutorial (http://www.massassi.net/basics/track.htm)
You want 00_soundtrack.cog
:)
ORJ_JoS
04-07-2005, 09:03 PM
....It's in the original JK cogs ofcourse!
*slaps self*
Thanks :)
Dude_Mann_JJ
04-09-2005, 10:12 AM
On a similar note, is there a way to change the cog so i plays a random music file from someone's computer as a soundtrack??
darthslaw
04-10-2005, 06:29 PM
you could play a .wav file in jk's or the mod's sound directory, and to an extent it can be random, but it's filename would have to be predefined in the cog.
in the symbols section, your wav file
sound wav=filename.wav
in the code section, your verb that plays it (note: 0x1 flag = loop sound).
PlaySoundLocal(wav, 1.0, 0.0, 0x1);
It's possible to randomize which wav file is played, if you had multiple files defined in the symbols...
For example:
flags=0x240
symbols
message startup
sound wav0=file0.wav
sound wav1=file1.wav
sound wav2=file2.wav
int r local
end
code
startup:
sleep(0.1);
playsound(wav0[rand() * 3], 1.0, 0.0, 0x1);
stop;
end
this will randomly choose one of the 3 sounds and play it at startup as your soundtrack. :)
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.