env_model

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:
- Position: Pitch Yaw Roll
- Appearance: all of them
targetnameTriggering the entity switches it on or off. See Common keys.
colormapColors 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
effectsSets 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
No effects (0)lightoriginNames 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.
modelSets 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.
models/editor/env_model.mdlskinSets the skin of the model, where 0 is the first.
0bodySets the body group value of the model, where 0 is the first.
0scaleDraws the model this many times its size, so 0.5 is half and 2 is double, and 0 or 1 is the normal size.
1frameSets the frame of the animation the model starts at, from 0 up to 255, and -1 picks a random frame.
0m_iszSequence_OnSets the name of the animation the model plays while it is on, and a name the model doesn't have plays its first animation.
m_iAction_OnSets 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
Freeze when sequence ends (0)m_flFramerate_OnSets 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.
m_iszSequence_OffSets the name of the animation the model plays while it is off, and a name the model doesn't have plays its first animation.
m_iAction_OffSets 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
Freeze when sequence ends (0)m_flFramerate_OffSets 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.
materialSets 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
Cinder Block (4)round_resetSets 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
No (0)Flags
1Initially OffThe entity starts off and plays Sequence when off
2Drop to FloorWhen 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 animationEach 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 clientsThe 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 1is set in the console
See also
env_static- a model that each player's game draws by itselfenv_render- changes the look of a model or fades it- Props, models and fades - models in a map
Changes since 1.38
env_modelis new in SBO 2.0.0

