Page 1 of 1

BZW Sound Block

Posted: Wed Jul 02, 2008 2:06 pm
by Spectre
Can you guys ("You Guys" being the brilliant C++ coders behind this entire game) add a BZW sound block that plays a sound ONLY when you go to a certain position? Like a WAV file, maybe?

Posted: Wed Jul 02, 2008 2:18 pm
by Spazzy McGee
I think there has been brief talk of this before. I think allowing of downloading short wav files into the game, similar to how we currently get images off a 'reputable' server, would be ideal. That way you can regulate the size and license of sounds.

It can currently be done with a plugin using the sounds that already come with the game. IIRC, PlayHistoryTracker has commented lines that call the spree*.wav files. Trouble is, I think it might crash clients earlier than 2.0.4, so nobody ever runs it.

I agree, perhaps adding a 'playsound' option to the zone object would be nice. One thing I would love to see added to the zone object is message sending when you enter a zone. It might be one down from playing sounds, but it could be useful.

Posted: Thu Jul 03, 2008 2:16 am
by Enigma
There is a function to play a sound effect in the plug-in API:

Code: Select all

// custom client sounds
bool bz_sendPlayCustomLocalSound ( int playerID, const char* soundName );
You could use the logic from the wwzones plug-in to play a sound instead of firing a world weapon. Although I think you are limited to sounds local to the client.