Kill: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Don't confuse this with the "kill" cmd which makes your character in-game take their own life.)
No edit summary
Line 1: Line 1:
{{TabsBar}}
{{TabsBar}}
{{stub}}{{Confusion|Not to be confused with the identically named console command.}}
{{stub}}
{{for|the console command|[[kill (console command)]]}}
{{code|Kill}} is an input that removes the named entity from play, and deletes its associated [[edict]].  
{{code|Kill}} is an input that removes the named entity from play, and deletes its associated [[edict]].  
An entity's [[children]] can be killed in the same [[Source Multiplayer Networking#Basic networking|tick]] by sending the {{code|KillHierarchy}} input instead, otherwise they will be killed on a subsequent tick.
An entity's [[children]] can be killed in the same [[Source Multiplayer Networking#Basic networking|tick]] by sending the {{code|KillHierarchy}} input instead, otherwise they will be killed on a subsequent tick.

Revision as of 07:07, 22 April 2025

Source Engine ( input | console command )
edit

Stub

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

For the console command, see kill (console command).

Kill is an input that removes the named entity from play, and deletes its associated edict. 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 use UTIL_Remove. This will kill the entity on the subsequent tick.
To kill entities via VScript use Destroy() or Kill() to kill the entity on the subsequent tick

See also