How to link footstep sounds to texture colours
by Mike Stoddart · in Torque Game Engine · 08/01/2002 (6:51 pm) · 7 replies
I'm sure you link texture colours with different footstep sounds (light, hard etc), but I can't find the code anywhere. I tried to search the forum, but because I had no idea what phrases or words to look for, I didn't find the answer.
Could someone please point me in the right direction?
Thanks
Could someone please point me in the right direction?
Thanks
#2
How exactly does this work? If I paint an area of the landscape with a texture I've called "grass", if I define:
When I walk over that area, will it play the sound defined by sound: 0?
Thanks
08/01/2002 (7:18 pm)
Yes I do thanks.How exactly does this work? If I paint an area of the landscape with a texture I've called "grass", if I define:
AddMaterialMapping("grass","detail: fps/data/terrains/details/detail1", "environment: fps/data/skies/sunset_0007 0.25", "color: color: 0.46 0.36 0.26 0.4 0.0", "sound: 0");When I walk over that area, will it play the sound defined by sound: 0?
Thanks
#3
You don't need the detail: section and the environment section. The detail isn't working right now (though I guess you could leave it in in case they ever get it working) and the Environment is for reflection maps on interiors/.difs only. I'm not completely sure that is working either (at least, I cant get it to work yet).
08/01/2002 (11:15 pm)
Yes, basically. It would play whatever predefined sound you have. I think it lists some there... 1 thru 4.You don't need the detail: section and the environment section. The detail isn't working right now (though I guess you could leave it in in case they ever get it working) and the Environment is for reflection maps on interiors/.difs only. I'm not completely sure that is working either (at least, I cant get it to work yet).
ddMaterialMapping("grass", "color: color: 0.46 0.36 0.26 0.4 0.0", "sound: 0"); SHOULD suffice...
#4
I tried playing around with it, but now when the player moves, no sound is played for footfall and the game visibly pauses when he steps. If I fire, this partly solves the problem as the game no longer pauses, but his foot steps now sound like his weapon!! Weird.
Thanks again
08/02/2002 (7:22 am)
Ok thanks Eric.I tried playing around with it, but now when the player moves, no sound is played for footfall and the game visibly pauses when he steps. If I fire, this partly solves the problem as the game no longer pauses, but his foot steps now sound like his weapon!! Weird.
Thanks again
#5
Did you change the sound: 0 to 1,2,3 or 4?
BTW, this is the one from RW's PropertyMap.cs :
addMaterialMapping( "grass" , "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0" );
08/02/2002 (7:56 am)
Odd...Did you change the sound: 0 to 1,2,3 or 4?
BTW, this is the one from RW's PropertyMap.cs :
addMaterialMapping( "grass" , "sound: 0" , "color: 0.46 0.36 0.26 0.4 0.0" );
#6
08/02/2002 (7:59 am)
I don't know! I can't remember what I changed, at least I didn't think I'd changed anything.
#7
I would imagine it is do-able but wonder if it's a code change rather than a script change.
10/17/2008 (8:05 am)
Does anyone know any way of changing the sound presets (e.g. sound: 3) so instead of snow it plays sludge or the rustle of carpet when footsteps are made on the material?I would imagine it is do-able but wonder if it's a code change rather than a script change.
Torque 3D Owner Eric Forhan
Not all of it may be working. The detail arg isnt, for example.