Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → playing .wav music looped?
playing .wav music looped?
2004-03-25, 6:53 PM #1
I'd like to know how to set up my MP level to play music, basically. If anyone could help me out with this, I'd appreciate it. If there's a tutorial or a cog available to do this somewhere, please just direct me to it, and I'm sorry I couldn't find on my own. Again, I appreciate it.

------------------
"There isn't anymore time, I don't know how it works. The life of others fades, and I stare into the abyss."
2004-03-25, 7:12 PM #2
Well if you want to have music in certain sectors then go to the sector sound value in the sector's item box and change it to your wav. To put in your wav make a folder called sound in your project directory. Then in the sector's items box cange the volume to anything below 1. I usually use one but thats just me. If you want the music in every sector then go into sector mode hold alt and drag it over your level. Then repeat the above steps.

------------------
Nightfire Mod
Spoting an error in post will result in a $100 reward.
Offer expires on 6/6/06. Valid one per customer, per day.

Rangi
2004-03-26, 11:40 AM #3
You could also have it play from a position (like a stereo -- fades as you get further away).

Here's a little cog I whipped up if you wanna use it. There's probably an LEC one already, but I don't feel like looking for it right now [http://forums.massassi.net/html/wink.gif] .

Code:
# Jedi Knight cog script
#
# playpossnd.cog
#
# Plays sound at a position and fades as you get further away, like
#  a radio or stereo.
#
# [Darth Slaw]
# 3/26/04
#==============================================================#
symbols

message   startup

sound     music=01cantinaband02.wav

thing     source=-1

flex      volume=1.0
flex      minrad=1.0
flex      maxrad=6.0

end
#==============================================================#
code
#------------------------------------------------------
startup:
	Sleep(1);
	PlaySoundPos(music, GetThingPos(source), volume, minrad, maxrad, 0x81);

Return;
#------------------------------------------------------
end


[edit] After rereading your post, it sounds like you want to have it play throughout the whole level. If that's the case, you'll likely want to do what a_person said about selecting all sectors and setting the sound. Water sectors will be a problem though. If you have underwater sectors (and you want the sound to play underwater too) then you'd have to do it through this line:
PlaySoundGlobal(music, volume, 0.0, 0x81);

Just paste it over the PlaySoundPos() line in the above cog. [http://forums.massassi.net/html/smile.gif]

------------------
I am Darth Slaw.
The Dark Lord of the Sith,
And part of the Nightfire mod team

[This message has been edited by Darth Slaw (edited March 26, 2004).]
May the mass times acceleration be with you.

↑ Up to the top!