Structs:TerrainDef
Jump to navigation
Jump to search
| Note: This feature is for ZScript only. |
TerrainDef is a ZScript struct that contains information about a texture that is defined through the TERRAIN lump. A TerrainDef of a specific floor texture can be obtained with GetFloorTerrain.
Fields
- Name TerrainName
- The name of the Terrain definition.
- int Splash
- The index of the splash actor spawned by this terrain. Currently this is not useful in ZScript, because it doesn't correspond to a splash definition name, and the function that could obtain this index from a splash name is not exposed to ZScript.
- int DamageAmount
- The amount of damage dealt to player when they step onto this terrain. Corresponds to the
DamageAmountproperty of the terrain definition.
- Name DamageMOD
- The DamageType dealt to player when they step onto this terrain. Corresponds to the
DamageTypeproperty of the terrain definition.
- int DamageTimeMask
- Determines how often this terrain deals damage. Corresponds to the
DamageTimeMaskproperty of the terrain definition.
- double FootClip
- The number of pixels an actors will "sink" into this terrain. Corresponds to the
FootClipproperty of the terrain definition.
- bool IsLiquid
- True if the terrain is defined as liquid. Corresponds to the
liquidproperty of the terrain definition.
- bool AllowProtection
- True if PowerIronFeet-based items should be able to protect from the damage of this terrain. Corresponds to the
AllowProtectionproperty of the terrain definition.
- bool DamageOnLand
- True if this terrain can deal falling damage. Corresponds to the
DamageOnLandproperty of the terrain definition.
- double Friction
- The friction factor of this terrain. Corresponds to the
Frictionproperty of the terrain definition.
- double MoveFactor
- The movement factor of this terrain. Corresponds to the
MoveFactorproperty of the terrain definition.
The following fields deal with the footstep sounds. For more information, read here.
- float StepVolume
- The volume of footstep sounds produced by this terrain. Corresponds to the
StepVolumeproperty of the terrain definition.
- int WalkStepTics
- The frequency in tics of footstep sounds produced by this terrain while walking. Corresponds to the
WalkStepTicsproperty of the terrain definition.
- int RunStepTics
- The frequency in tics of footstep sounds produced by this terrain while running. Corresponds to the
RunStepTicsproperty of the terrain definition.
- Sound LeftStepSound
- The "left foot" step sound produced by the terrain. Corresponds to the
LeftStepSoundsproperty of the terrain definition.
- Sound RightStepSound
- The "right foot" step sound produced by the terrain. Corresponds to the
RightStepSoundsproperty of the terrain definition.
- Sound StepSound (development version 12d1afc only)
- A generic, foot-agnostic step sound produced by the terrain. By default, this sound takes precedence over the foot-specific sounds when a player with the MAKEFOOTSTEPS flag set walks over a sector with this terrain. Corresponds to the
StepSoundsproperty of the terrain definition.
- double StepDistance (development version d07d08c only)
- A distance (As opposed to time-based, like the Walk/RunStepTics parameters) interval for footsteps. Used by the default footstep system for making steps based on how much and how fast the player is moving, as opposed to set time intervals where the player moves on the terrain.
- double StepDistanceMinVel (development version d07d08c only)
- If StepDistance isn't 0. This is the velocity the player must have been going at when the distance interval was reached, for a footstep to happen.