Game Development Community

More Sound Questions

by Frank Sutton · in Torque Game Engine · 02/10/2006 (6:09 pm) · 2 replies

Observing player.cs I see the following:

// Footstep Sounds
FootSoftSound = FootLightSoftSound;
FootHardSound = FootLightHardSound;
FootMetalSound = FootLightMetalSound;
FootSnowSound = FootLightSnowSound;
FootShallowSound = FootLightShallowSplashSound;
FootWadingSound = FootLightWadingSound;
FootUnderwaterSound = FootLightUnderwaterSound;

What determines when to play which sound? In other words, how does the engine know If I'm on grass, or sand, or watter, or metal, or in shallow water, etc? What determines a soft footstep vs a hard footstep?

- Frank

#1
02/13/2006 (7:58 am)
The material mapping defines the sounds. But it only works for terrains: if the player steps on an interior, the metalSound is used.

It's done in Player::updateActionThread(), along with the footprints.
#2
02/13/2006 (8:15 am)
Thanks Manoel. I'll take another look at the player.cc file.