env_shooter

An env_shooter shoots a model or a sprite of your choice each time you trigger it, as gibs that bounce or stick, or
as shots that fly and can fire targets when they hit something.
Attributes
The entity also has these common keys:
- Position: Pitch Yaw Roll
- Appearance: all except Effects and Body
targetnameTriggering the entity shoots its gibs. See Common keys.
m_iGibsSets how many gibs it shoots each time you trigger it, one every Delay between shots.
If you leave this key empty, it is 0 and the entity shoots one gib.
3delaySets how many seconds pass between two gibs, and 0 means 0.1 seconds.
0m_flVelocitySets the speed of the gibs, in units per second, as a locus number. It can be a number such as 200, a range such as 100..300 for a random speed, or the name of a calc_ entity. With Direction and speed set and this key empty, the length of that vector is the speed.
If you leave this key empty, it is 0 and the gibs just drop, unless Direction and speed is set.
200Sets where the gibs appear, as a locus position. It can be a point such as 0 0 64, the name of an entity, or !activator for the entity that started the chain of triggers.
If you leave this key empty, the gibs appear at the entity itself.
Sets the direction the gibs fly in, as a locus vector. Its length times Gib Velocity is their speed.
If you leave this key empty, the gibs fly in the direction of Pitch Yaw Roll.
m_flVarianceSets how far each gib strays from the direction, from 0 for straight up to about 1 for a wide spread.
If you leave this key empty, it is 0 and all gibs fly the same way.
0.15m_flGibLifeSets how many seconds the gibs last before they fade out.
If you leave this key empty or set 0, they last 25 seconds.
4m_iszSpawnTargetThe entity fires this for each gib or shot it makes, and passes on that gib or shot as the activator.
Names the parent, an entity that this one moves and turns with. The entity keeps the place and the angles it has on the parent in the editor. If several entities have the name, the first one counts. A name ending in .1 to .4 puts a sprite or a model that isn't solid on that attachment point of the model of the parent. A solid brush on a parent that turns needs its own origin brush. Moving objects explains it all.
If you leave this key empty, the entity doesn't move with anything.
parentflagsKeeps some of the entity's own position or angles instead of following the parent. Add up the values of the axes to keep: 2 for X, 4 for Y, 8 for Z, 16 for pitch, 32 for yaw and 64 for roll. So 112 keeps the entity level. 0 follows the parent on every axis.
0shootmodelSets the model (.mdl) or the sprite (.spr) it shoots. A model with several submodels gives each gib one of them at random.
If you leave this key empty, or use an editor model or a file the server doesn't have, the entity is removed when the map starts.
shootsoundsPicks the material the gibs are made of, so they play its sounds when they hit something.
- None (-1) - The gibs make no sound
- Glass (0)
- Wood (1)
- Metal (2)
- Flesh (3)
- Concrete (4)
None (-1)scaleSets the size of each gib or shot, where 1 is the size of the model or the sprite, 2 is double and 0.5 is half.
If you leave this key empty, the gibs have their normal size.
skinSets the skin of each gib, for a model with several skins, where 0 is the first.
0bloodcolorSets the blood the gibs leave on the surfaces they hit.
- Default (0) - The gibs don't bleed
- Human (247) - Red blood
- Alien (195) - Yellow blood
Default (0)start_gib_bodySets the first submodel a gib can take, so the gibs skip the submodels before it and take one from this one on, at random.
0m_iPhysicsSets how each piece moves. A gib is a piece of debris, and a shot is a sprite or model that flies and fires the collision targets when it hits something.
- Bouncy gib (0) - A gib that bounces until it comes to rest
- Sticky gib (1) - A gib that sticks to the first surface it hits
- Noclip shot (2) - A shot that flies through walls and everything else, so it never fires the collision targets
- Fly shot (3) - A shot that flies straight, without gravity
- Fly & bounce shot (4) - A shot that flies straight and bounces off surfaces
- Arc shot (5) - A shot that falls in an arc
- Arc & bounce shot (6) - A shot that falls in an arc and bounces off surfaces
Bouncy gib (0)frameSets the frame the sprite of a shot starts on, where 0 is the first. Gibs ignore it.
0framerateSets how many frames per second the sprite of a shot plays. Gibs ignore it.
If you leave this key empty or set 0, the shot shows one frame.
m_fFrictionSets how much speed a bounce shot loses when it bounces, from 0 for none, so it bounces back at full speed, up to 1, where it doesn't bounce and slides along the surface.
0.55m_iszTouchNames the entities a shot triggers each time it touches something, at most every 0.1 seconds, with the shot as the activator.
m_iszTouchOtherNames the entities a shot triggers each time it touches something, at most every 0.1 seconds, with what it hit as the activator. When it hits a wall or the floor of the map, the shot at the point of the hit is the activator.
m_vecSizeSets the size of the box of a shot, as X Y Z in units.
If you leave this key empty, the shot is a point.
Flags
1RepeatableThe entity stays after it has shot all its gibs, so you can trigger it again. Without this flag, it is removed after the last gib
4Don't wait till landEach gib fades out when its Gib Life ends, even while it still flies. Without this flag, it waits until it lands
8Start instantlyThe first gib flies at the moment you trigger the entity. Without this flag, it flies a moment later
Notes
- The entity reads Gib Velocity, Position and Direction and speed again for each gib, for the entity that started the chain of triggers
- If the entity can't find the value of one of those keys, it skips that gib, but the gib still counts toward Number of Gibs
- Once the map runs,
trigger_changevalueandtrigger_copyvaluecan't change Model or Sprite name, so the entity keeps shooting its model, and withdeveloper 1set in the console, the console says why
See also
gibshooter- shoots body gibsenv_explosion- an explosion with a fireball and damage- env_shooter on TWHL - the Half-Life entity
Changes since 1.38
- You can use the new keys Position, Direction and speed, Fire on spawn, Gib Blood Color, Start gib body, Gib/Shot physics, Start frame, Framerate, Bounce friction, both Fire on collision keys and Shot size, and the new flags Don't wait till land and Start instantly
- Gib Velocity also takes a range or the name of a
calc_entity

