dirt spray

  • Thread starter Thread starter fuzzalicious
  • Start date Start date
F

fuzzalicious

Guest
How do you make so that ground sprays dirt when hit by bullets?
 
You need to choose a texture that has a specific surface property. Basically, when you make a texture you make a VTF file that stores the pure image data and a VMT that is a supporting text file that stores other data, such as what surface type it is, if it needs to be treated as reflective, etc. Different surfaces give different bullet decals and different richochet and footstep sounds.

The information from the VMT tells the game to use a specific line defined in a separate script file. It works something like:
- Player shoots object
- Game finds the material the object is textured in and looks up the VMT
- In the material's VMT the surface type is 'dirt'
- Game checks what sound and visual effects to play and display for 'dirt'
- Player hears and sees the correct information

If you're making your own texture, you need to make a VMT file to go with it and choose a terrain surface type by adding a line like:
Code:
"$surfaceprop" "dirt"

If you're using someone else's texture (e.g. a HL2 or CSS texture), you shouldn't change their texture's VMT unless they haven't made it properly. It's better to find a dirt texture that gives you the desired effect.
 
Back
Top