Footstep sound on different material

Blitz3D Forums/Blitz3D Programming/Footstep sound on different material

wesh,

Another approach could be to put a simple switch trigger at the room/area entry point that changes the walking sound. However, this method is not suitable for large outdoor areas.

IMHO, Axeman's technique could be the simplest and most flexible. My version of the technique would go like so:
Collisions player,wood,method,response
Collisions player,sand,method,response
Collisions player,iron,method,response
Collisions player,snow,method,response
To detect and play sound dependent on surface
If EntityCollided(player,wood) PlaySound( "footstep_wood" )