Killtarget: Difference between revisions
Jump to navigation
Jump to search
Code:To kill entities via code:
SirYodaJedi (talk | contribs) mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{stub}} | {{stub}} | ||
{{split|kill input and killtarget should be split}} | |||
{{code|killtarget}} is a [[KV]] in many {{idtech2|2}} and {{goldsrc|2}} entities. It removes the named entity from play, and deletes its associated [[edict]]. This is known as "killtargeting". | {{code|killtarget}} is a [[KV]] in many {{idtech2|2}} and {{goldsrc|2}} entities. It removes the named entity from play, and deletes its associated [[edict]]. This is known as "killtargeting". | ||
Revision as of 09:34, 18 September 2024
killtarget is a KV in many id Tech 2 and
GoldSrc entities. It removes the named entity from play, and deletes its associated edict. This is known as "killtargeting".
In Source, entities are killtargeted by sending them the Kill input. An entity's children can be killed in the same tick by sending the KillHierarchy input instead, otherwise they will be killed on a subsequent tick.

- In
GoldSrc, use REMOVE_ENTITY.
- In
Source, use UTIL_Remove.
These will kill the entity on the subsequent tick.