Killtarget: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Killing via code)
mNo edit summary
Line 7: Line 7:
* In {{goldsrc|2}}, use {{ent|REMOVE_ENTITY}}.
* In {{goldsrc|2}}, use {{ent|REMOVE_ENTITY}}.
* In {{src|2}}, use {{ent|UTIL_Remove}}.
* In {{src|2}}, use {{ent|UTIL_Remove}}.
These will kill the entity on the subsequent tick.
}}
}}


[[Category:Glossary]]
[[Category:Glossary]]
[[Category:GoldSrc Glossary]]
[[Category:GoldSrc Glossary]]

Revision as of 09:59, 29 June 2024

Stub

This article or section is a stub. You can help by expanding it.

killtarget is a KV in many id Tech 2 id Tech 2 and GoldSrc GoldSrc entities. It removes the named entity from play, and deletes its associated edict. This is known as "killtargeting".

In Source 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.

Cpp.pngCode:To kill entities via code:

These will kill the entity on the subsequent tick.