12-Jul-2023
Similar to env_shooter, except that this can only fire human gibs.
Keyvalues |
OnDestroy Function ondestroyfn : Name of the function to use from already parsed .as script files when entity is destroyed (killed) in any way. If the function belongs to namespace, you must use prefix with the namespace name (e.g. mynamespace::MyFunction) for the keyvalue.
Name targetname : Set name of gibshooter so other entities can trigger it to start shooting gibs. Every trigger use-type works uniformly. Can't be triggered when gibs shooting is in progress. Can be kill-targeted but gibs stay.
Pitch Yaw Roll (X Y Z) angles : Where Z means Y and Y means Z, that is, when you're thinking Hammer-grid. (Hammer uses Z for height and Y for depth, while every other sane 3D-application does this the other way round; nonetheless this keyvalue description has the letters in the conventional order) This, technically, is a 3D-vector containing Euler-angles to describe either the entity's rotation or direction of effect. E.g. a func_door_rotating will use this as its initial rotation, while a trigger_push will keep its original alignment and use this for the direction of its push-effect instead. Euler-angles are a hierarchical system to determine an object's orientation in 3D-space. A yaw-value of 0 would mean the entity would face east. (right in top-down view) 90 would mean it would face north. (up in top-down-view) After yaw, pitch is applied. Think aiming up/down with your character in first person. At last, the roll-value is applied. Think your character falling over sideways in first person. Some entities, mostly point entities, do not use the angles keyvalue for any purpose.
Number of Gibs m_iGibs : Set the amount of gibs to be shot when triggered.
Delay between shots delay : Set a delay between the individual gibs to be fired, in seconds.
Gib Velocity m_flVelocity : Firing-velocity of the gibs shot, in units per second.
Course Variance m_flVariance : This is multiplied with 3 random numbers from -1 to 1 to form a vector to be added to the normalized direction-vector of the gib-direction, per gib. A great value like 100 would make the gib-direction almost entirely random. You can think of this as a value between 0 and 1 resulting in a course-cone from 0 to 180 degrees size, though that's not exactly what it is, just an approximation.
Gib Life m_flGibLife : Time, in seconds, the gib will be visible till fading out of world and getting removed. This is actually randomly altered for every individual by minus to plus 5 per-cent.
1 : Repeatable : If set, the gibshooter can be used more than once.
If your delay between shots is 0, the game may increase it notably; 0.01 works, though.
The gibs also bounce off players.
Gibs do not get stuck in each other.