Skip to main content

env_model

env_model icon
Point entityPorted from FeaturefulSpirit of Half-Life

An env_model shows an animated model with one animation while it is on and another while it is off. Each animation can loop, stop on its last frame, or switch the entity to its other state when it ends.

Triggering the entity switches it on or off, as the use type says, and the model plays the animation of its new state.

Attributes​

The entity also has these common keys:

KeyDescriptionDefault
Nametargetname

Triggering the entity switches it on or off. See Common keys.

Colormapcolormap

Colors the parts of the model that a player model colors with the player's chosen top and bottom colors. A model without such parts doesn't change.

The 81 choices
  • Red top, red bottom (0)
  • Red top, orange bottom (5120)
  • Red top, yellow bottom (10240)
  • Red top, green bottom (17920)
  • Red top, light green bottom (28160)
  • Red top, light blue bottom (33280)
  • Red top, blue bottom (40960)
  • Red top, purple bottom (51200)
  • Red top, pink bottom (57600)
  • Orange top, red bottom (20)
  • Orange top, orange bottom (5140)
  • Orange top, yellow bottom (10260)
  • Orange top, green bottom (17940)
  • Orange top, light green bottom (28180)
  • Orange top, light blue bottom (33300)
  • Orange top, blue bottom (40980)
  • Orange top, purple bottom (51220)
  • Orange top, pink bottom (57620)
  • Yellow top, red bottom (40)
  • Yellow top, orange bottom (5160)
  • Yellow top, yellow bottom (10280)
  • Yellow top, green bottom (17960)
  • Yellow top, light green bottom (28200)
  • Yellow top, light blue bottom (33320)
  • Yellow top, blue bottom (41000)
  • Yellow top, purple bottom (51240)
  • Yellow top, pink bottom (57640)
  • Green top, red bottom (70)
  • Green top, orange bottom (5190)
  • Green top, yellow bottom (10310)
  • Green top, green bottom (17990)
  • Green top, light green bottom (28230)
  • Green top, light blue bottom (33350)
  • Green top, blue bottom (41030)
  • Green top, purple bottom (51270)
  • Green top, pink bottom (57670)
  • Light green top, red bottom (110)
  • Light green top, orange bottom (5230)
  • Light green top, yellow bottom (10350)
  • Light green top, green bottom (18030)
  • Light green top, light green bottom (28270)
  • Light green top, light blue bottom (33390)
  • Light green top, blue bottom (41070)
  • Light green top, purple bottom (51310)
  • Light green top, pink bottom (57710)
  • Light blue top, red bottom (130)
  • Light blue top, orange bottom (5250)
  • Light blue top, yellow bottom (10370)
  • Light blue top, green bottom (18050)
  • Light blue top, light green bottom (28290)
  • Light blue top, light blue bottom (33410)
  • Light blue top, blue bottom (41090)
  • Light blue top, purple bottom (51330)
  • Light blue top, pink bottom (57730)
  • Blue top, red bottom (160)
  • Blue top, orange bottom (5280)
  • Blue top, yellow bottom (10400)
  • Blue top, green bottom (18080)
  • Blue top, light green bottom (28320)
  • Blue top, light blue bottom (33440)
  • Blue top, blue bottom (41120)
  • Blue top, purple bottom (51360)
  • Blue top, pink bottom (57760)
  • Purple top, red bottom (200)
  • Purple top, orange bottom (5320)
  • Purple top, yellow bottom (10440)
  • Purple top, green bottom (18120)
  • Purple top, light green bottom (28360)
  • Purple top, light blue bottom (33480)
  • Purple top, blue bottom (41160)
  • Purple top, purple bottom (51400)
  • Purple top, pink bottom (57800)
  • Pink top, red bottom (225)
  • Pink top, orange bottom (5345)
  • Pink top, yellow bottom (10465)
  • Pink top, green bottom (18145)
  • Pink top, light green bottom (28385)
  • Pink top, light blue bottom (33505)
  • Pink top, blue bottom (41185)
  • Pink top, purple bottom (51425)
  • Pink top, pink bottom (57825)
Effectseffects

Sets an engine effect for the model.

  • No effects (0) - No effect
  • Invert light (take light from ceiling) (16) - The model takes its light from the ceiling above it, where normally it takes it from the floor below it
Default No effects (0)
Light originlightorigin

Names an info_light_origin, and the model is lit as if it stood there.

If you leave this key empty, the model is lit by the floor under it.

Model namemodel

Sets the model it shows, as a path to an .mdl file. A new entity starts with models/editor/env_model.mdl, an editor model that only the editor has, a box 32 by 32 by 72 units labeled ENV MODEL whose arrow shows the yaw.

If you leave this key empty, keep the editor model, or name a file the server doesn't have, the entity is removed when the map starts.

Default models/editor/env_model.mdl
Skinskin

Sets the skin of the model, where 0 is the first.

Default 0
Bodybody

Sets the body group value of the model, where 0 is the first.

Default 0
Scalescale

Draws the model this many times its size, so 0.5 is half and 2 is double, and 0 or 1 is the normal size.

Default 1
Starting frameframe

Sets the frame of the animation the model starts at, from 0 up to 255, and -1 picks a random frame.

Default 0
Sequence when onm_iszSequence_On

Sets the name of the animation the model plays while it is on, and a name the model doesn't have plays its first animation.

Behavior when onm_iAction_On

Sets what the model does when Sequence when on reaches its last frame while the entity is on.

  • Freeze when sequence ends (0) - The model stays on the last frame
  • Loop (1) - The animation starts again
  • Change state when sequence ends (2) - The entity switches off and plays Sequence when off
Default Freeze when sequence ends (0)
Framerate when onm_flFramerate_On

Sets how fast the on animation plays: 1 is its own speed and 2 is twice as fast.

If you leave this key empty or set 0, it is 1.

Sequence when offm_iszSequence_Off

Sets the name of the animation the model plays while it is off, and a name the model doesn't have plays its first animation.

Behavior when offm_iAction_Off

Sets what the model does when Sequence when off reaches its last frame while the entity is off.

  • Freeze when sequence ends (0) - The model stays on the last frame
  • Loop (1) - The animation starts again
  • Change state when sequence ends (2) - The entity switches on and plays Sequence when on
Default Freeze when sequence ends (0)
Framerate when offm_flFramerate_Off

Sets how fast the off animation plays: 1 is its own speed and 2 is twice as fast.

If you leave this key empty or set 0, it is 1.

Materialmaterial

Sets the sound and the sparks, chips and puffs that bullets make when they hit the model. It only works with Solid (model hitboxes).

The 9 choices
  • Glass (0)
  • Wood (1)
  • Metal (2)
  • Flesh (3)
  • Cinder Block (4)
  • Ceiling Tile (5)
  • Computer (6)
  • Unbreakable Glass (7)
  • Rocks (8)
Default Cinder Block (4)
Reset at round startround_reset

Sets whether the entity goes back to its state of the map start at each new round of Co-op, Battle Royale and Bounty Killer, before the players spawn.

  • No (0) - The entity keeps its state
  • Yes (1) - The entity goes back to its state of the map start
Default No (0)

Flags​

1Initially Off

The entity starts off and plays Sequence when off

2Drop to Floor

When the map starts, the model drops onto the floor below it

4Solid (20 unit box)

The model is solid, as a box 20 units wide

8Solid (model hitboxes)

The model is solid in the shape of its hitboxes. The model must be compiled with $flags 512 and $hbox lines, and a model without them is solid as the 20-unit box

16Client-side animation

Each player's game animates the model by itself, so the server sends no frame updates. The server still knows when an animation ends

32Always send to clients

The model is sent to every player, even when they can't see it, which uses more of the network connection

Notes​

  • Bullets leave no decal on the model
  • If the model has no animation with a name you set, the console reports it when developer 1 is set in the console

See also​

Changes since 1.38​

  • env_model is new in SBO 2.0.0