Killtarget: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Kill input does kill children, just not on the same tick)
(split)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{TabsBar|main=Kill}}
{{stub}}
{{stub}}
{{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".


In {{src|2}}, entities are killtargeted by sending them the {{code|Kill}} [[I/O|input]]. An entity's [[children]] can be killed in the same [[tick]] by sending the {{code|KillHierarchy}} input instead, otherwise they will be killed on a subsequent tick.
{{Codenote|To kill entities via code use {{ent|REMOVE_ENTITY}}. It will kill the entity on the subsequent tick.}}


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

Latest revision as of 11:46, 17 March 2025

Source Engine ( input | console command )
edit

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".

Cpp.pngCode:To kill entities via code use REMOVE_ENTITY. It will kill the entity on the subsequent tick.