Textures Sounds

Blitz3D Forums/Blitz3D Programming/Textures Sounds

Yue(Posted 2011) [#1]
Hello, you need to know as I do in theory to know that a character steps on materials, this in order to trigger sounds to grass, concrete, water, according to the texture where the character is located.

Greetings.


Charrua(Posted 2011) [#2]
i supose, you know the entity where your player is over, via collisions or entitypick

you can have a Typed structure with information about it and/or the texture applied.

or, use some functinons to get the brush applied to the entity (GetEntityBrush) then GetBrushTexture and last TextureName to get the filename of the texture applied.

but i think that creating Typed objects and keep track of their use on the game should be better.

Juan


Yue(Posted 2011) [#3]
Thanks You(Gracias,Dank)


John Blackledge(Posted 2011) [#4]
This is the core of what I use:-


Basically you're getting the name of the texture that you have just collided with.
Then do an Instr(), if it's "GRASS" play one sound, if it's "STONE" play another sound.

You get the idea.