junk2drive
Posts: 12907
Joined: 6/27/2002 From: Arizona West Coast Status: offline
|
How would you like to add sounds to a specific feature on your map? Like birds in some trees or frogs in a swamp? Not the annoying constant loop of background sounds everywhere on the map. 3. Add support for map ambient sounds: You will add some lines to your <name>scene.xml Sounds need to be 44.1KHz, mono, 16 bit, wavs and sound good when looped. Place a copy of the sound file in the map folder. Add this to your scene.xml <sounds> <sound mediaId="nameofsound" volume="100" location="530,19.5,742" rollOff="10" cutOff="250" /> <sound mediaId="nameofsound" volume="100" location="335,12.7,346" rollOff="10" cutOff="125" /> </sounds> mediaId = standard media Id. Example <resource id="Birds.wav" filename="mapfoldername/Birds.wav" /> volume (integter) = volume from 0 to 100% location = (X,Y,Z) location of where the sound is coming from in meters. Y = height above ground. location can be found in MapSceneEditor. Double click on an object you want the sound to come from. Bring up the location properties box and you will see X,Y,Z. These are in world scale units, so to convert to meters you will need to * by 2.54. rollOff = distance is meters from the sound source when the sound starts to attenuate cutOff = distance in meters from the sound source when the sound goes dead (can't be heard). So by manipulating, location, volume, rollOff and cutOff (and the original looping sound), you can simulate just about anything soundwise.
_____________________________
Conflict of Heroes "Most games are like checkers or chess and some have dice and cards involved too. This game plays like checkers but you think like chess and the dice and cards can change everything in real time."
|