Game Development Community

PropertyMap.cs Where called from?

by Mike Rowley · in Technical Issues · 10/20/2006 (8:31 pm) · 13 replies

I want to add some extra sounds to some of my textures, but can't figure out where the propertymap.cs gets its sound files called from.

addMaterialMapping( "sand" , "sound: 0"

Is the "sound: 0" the global channel assignment from "audioProfiles.cs" in client/scripts?

#1
10/30/2006 (7:43 pm)
Has nothing to do with the file used for audio. It tells the game what type of sound to grab from the player/vehicle datablock. But I may be misunderstanding your understanding of the function. At any rate that call is made from \demo\data\terrains\highplains\propertyMap.cs

Texture Detail Map Name, Texture Environment Map Name, Color: red green blue startAlpha endAlpha, Sound: Soft=0 Hard=1 Metal=2 Snow=3
#2
10/31/2006 (6:58 pm)
I'm talking about the "sound: 0" part. I know the 0 points to something that makes the sound work, I just don't know where its at in the code. I need to add a material map for a sound of my own, that's why I'm looking for it.
What I do know:
0 is unused
#3
11/03/2006 (12:06 pm)
The are linked to in the player datablock, and yes 0 is used.
FootSoftSound        = FootLightSoftSound; // 0
   FootHardSound        = FootLightHardSound; // 1
   FootMetalSound       = FootLightMetalSound; // 2
   FootSnowSound        = FootLightSnowSound; // 3
#4
11/03/2006 (12:53 pm)
^^ Correct.

The playing of the footsteps however is controlled by an animation trigger in the model.
#5
11/03/2006 (2:34 pm)
Does it work in the default SDK for terrains out of box, yet[was/is broken for some time, I believe{asof 1.4.2}]?? I see that interiors[now] have several sounds associated, yet terrain STILL only seems to have index[0] working... whatever is in the first slot ONLY of the Terrain Painter browser....sound and particle. I can't really tell from the scripted Demo available. Thanks.
#6
11/03/2006 (3:35 pm)
Ahh, thanks. That answers my questions. :)
#7
11/03/2006 (3:59 pm)
It seems fixed in 1.4.2

And yes the playing of the sound is triggered by animation, the sound to play is triggered by the material map. Yadda yadda.
#8
11/03/2006 (5:36 pm)
Really? I tried and tried, I put specific sounds with specific primary colour particles and with a stock SDK...I could only get sound for the texture in the first slot position in the Editor. I would run over different textures, but could never get the other sounds, until I put that texture into the first slot position...go figure? I can add trigger into sequences at will, getting differing zounds working, huh? can you show a properly setup script for terrain? And it still really doesn't answer why the Demo only has the soft sound for terrain?! Thanks.
#9
11/03/2006 (7:17 pm)
I don't think textures applied with the painter work. Only those added in via standard operations.
#10
11/03/2006 (7:22 pm)
I would have thought painter was a standard operation,






lol.

But, no i haven't gotten them to work correctly. Water does however work.
#11
11/04/2006 (9:47 am)
I am not quite understanding, Zod. When I open & use the Terrain Texture Painter of the default Stronghold.mis, only the texture in the first slot position gets it's sound & particle applied. When I then open the Terrain Texture Editor, I don't see any textures at all, but I do get a sound of index[0]?! When I do switch the texture in the first slot of the Terrain Texture Painter, I then get that sound. So the only way it works in default SDK, you are saying, is to use the Terrain Texture Painter only? or in combination? or how exactly, :)? Thanks.
#12
11/04/2006 (2:37 pm)
I'm using slot 4 (softsnowsound) for a wooden walkway sound and it works. I changed the sound and texture files to the ones I needed. My walkway is a textured dif.
#13
11/04/2006 (6:04 pm)
This is strickly about terrain[and always has been!]; I mentioned earlier up about seeing the new scripting for .dif's in the v1.5 Demo...it's the terrain I've always had difficulties with, ;), getting multiple sounds. Glad to see that the materialMappingProperty is working for .dif geometry now...:). When Constructor releases; things will be in very working order.