Footstep sounds
by Daniel Neilsen · in Torque Game Engine · 10/08/2002 (12:59 pm) · 4 replies
Can someone please explain to me how to get different footstep sounds for different textures working?
It was my thoguht that somethign like this would work.
addMaterialMapping( "dirt_road" , "sound: 2" , "color: 0.46 0.36 0.26 0.4 0.0" );
but it does not seem to?
(ie. this would play sound 2)
It was my thoguht that somethign like this would work.
addMaterialMapping( "dirt_road" , "sound: 2" , "color: 0.46 0.36 0.26 0.4 0.0" );
but it does not seem to?
(ie. this would play sound 2)
About the author
#2
10/09/2002 (5:21 am)
in my game there's always 1 footpuff and 1 sound playing for every move.. not depending on the texture you are standing on...except when you run forward,then it doesn't do anything at all. So...I guess I even have a bigger problem then you ;) I'll look into it soon tough.
#3
(Sorry, at work here.. not exactly being thorough.)
10/09/2002 (8:21 am)
Where did you put your dirt_road.jpg? i.e. if you have torque under C:\torque and have your game scripts under C:\torque\example\putyournamehere\etc. Did you put dirt_road.jpg under C:\torque\example? If it's under C:\torque\example\putyournamehere\data\some\thing\dirt_road.jpg then the addMaterialMapping should be adding "putyournamehere/data/some/thing/dirt_road". Otherwise, the index won't be valid because it can't find the file.(Sorry, at work here.. not exactly being thorough.)
#4
I tried the following combinations
None of these seem to work. When you get home could you possibly post an example?
10/09/2002 (1:19 pm)
Hi IceI tried the following combinations
addMaterialMapping( "~/data/terrains/grassland/grass" , "sound: 2" , "color: 0.46 0.36 0.26 0.4 1.0" ); addMaterialMapping( "trakers/data/terrains/grassland/grass" , "sound: 2" , "color: 0.46 0.36 0.26 0.4 1.0" ); addMaterialMapping( "~/data/terrains/grassland/grass.jpg" , "sound: 2" , "color: 0.46 0.36 0.26 0.4 1.0" ); addMaterialMapping( "/trakers/data/terrains/grassland/grass" , "sound: 2" , "color: 0.46 0.36 0.26 0.4 1.0" );
None of these seem to work. When you get home could you possibly post an example?
Torque Owner Daniel Neilsen
TerrainBlock* tBlock = static_cast<TerrainBlock*>(rInfo.object); // Footpuffs, if we can get the material color... S32 mapIndex = tBlock->mMPMIndex[0]; if (mapIndex != -1) {Anyone have any experience in the terrainBlock info?