env_player_surface_trigger

From Source Entities
Jump to navigation Jump to search

Code classes:

env_player_surface_trigger is a point entity present in all Source games. It monitors the $surfaceprop of the material of the surface the player is standing on, and fires outputs whenever it changes to/from a specific material.

Note: Will not work well, if at all in multiplayer games.

Keyvalues[edit | edit source]

Game Material to Watch (gamematerial) <choices>
The material to watch for. When the player stands on/off this material, the entity's outputs will be fired. To do: There must be other values which aren't listed!
Literal value Description
0 None (player is in the air)
67 Concrete
77 Metal
68 Dirt
86 Vent
71 Grate
84 Tile
83 Slosh (Surfaceprop must be "water" or "slime". Does not detect actual water.)
87 Wood
80 Computer
89 Glass
70 Flesh
73 Clip
79 Foliage
78 Sand

Inputs[edit | edit source]

Enable
Makes the entity active.
Disable
Makes the entity inactive.

Outputs[edit | edit source]

OnSurfaceChangedToTarget
Fires when the player moves onto the specified surface.
OnSurfaceChangedFromTarget
Fires when the player moves off the specified surface.