Difference between revisions of "UFO-Scripts/terrain.ufo"

From UFO:AI
Jump to navigation Jump to search
 
(No difference)

Latest revision as of 13:00, 6 July 2010

This script file allows you to define some terrain settings that depends on the texture. Keep in mind, that this is global in the game - not per map. The given id is a ufo path of the texture - relative to Template:Path.

We have a script in Template:Path that is parsing the textures from the map source files when they have the surfaceflag footstep set.

footstepsound V_STRING
Sound to play for footsteps relative to base/sound (see Directory tree)
bouncefraction V_FLOAT
The fraction by which grenade bounces are multiplied. 1.0 means no change, 0.0 means no bounce at all. If not specified, defaults to 1.0.
particle V_STRING
Particle that is shown when an actor walks on this texture
footstepvolume V_FLOAT
The volume of the footstep sound. 1.0 is the loudest, default is 0.2

Example

// normal grass
terrain tex_nature/grass001 {
	footstepsound "footsteps/grass2"
	bouncefraction 0.3
}

// high grass
terrain tex_nature/jungle002 {
	footstepsound "footsteps/grass2"
	bouncefraction 0.2
}