Location Based Sound
by Minako · in General Discussion · 07/28/2002 (1:49 am) · 4 replies
Can the engine play sound based on the player location? (like the sound of waves on the shore when you're near the waterline)
Minako
Minako
#2
07/28/2002 (5:05 pm)
You could probably use a trigger to play a sound couldn't you? That might be a little tricky for something like a sea shore, but I think it could be done.
#3
I don't know if the same is true for TGE.
07/28/2002 (6:48 pm)
It seems like in T2 you can associate sounds to a particular texture as well as associating a bumpmap to that texture. So, when on snow it plays a different footstep sound than on hard rock, etc.I don't know if the same is true for TGE.
#4
FootSnowSound = FootLightSnowSound;
and
FootUnderwaterSound = FootLightUnderwaterSound;
To be honest, I don't really know how these work, but I could imagine it being possible to create a looping "sea shore" type sound instead of a foot fall with basically the same setup.
07/28/2002 (8:16 pm)
Yeah, thats a good point eric, I didn't even think of that. You can specify different foot fall sounds for different materials, such as snow or metal or whatever. If you look in ~/server/scripts/player.cs in the LightMaleHumanArmor datablock there are a few declarations like:FootSnowSound = FootLightSnowSound;
and
FootUnderwaterSound = FootLightUnderwaterSound;
To be honest, I don't really know how these work, but I could imagine it being possible to create a looping "sea shore" type sound instead of a foot fall with basically the same setup.
Torque Owner Matt W
Although, realistic ambient sound would require a bit of programming to get in.
Right now, you just pick a point for the ambient sound to come from. It works, but isn't quite perfect for something like a shoreside sound.