Skip to content

Kill

Kills an Entity by calling Death (with activatekill) on it.

Syntax

|kill,entity|

Parameters

entity: this | caller | int

The Entity to kill:

  • this: Refers to tailtarget's entity (This only reliably works in Dialogue mode otherwise, it will take the last value of tailtarget which is potentially undefined behavior).
  • caller: Refers to the caller if it is not null. If it is, this command does nothing.
  • int: Refers to any other Entity id. If it resolves to null, an exception will be thrown.

Any non int value that isn't in one of the predefined values above will cause an exception to be thrown.

Remarks

There is a special case for Shop and CaravanBadge interactions on the caller where it will call SetBadgeShop(true) on the entity's NPCControl for the former and on the shopkeeper of the NPCControl for the latter.

This command only kills the entity if its NPCControl isn't null and it doesn't have a CaravanBadge interaction.

Once the entity has been killed if applicable, the player's list of NPCControl is reset to a new list.