NPC (Command): Difference between revisions
(Created page with "category:Commands The NPC command has a number of parameters which effectively are separate NPC related commands. ===Spawn=== Spawn NPCs in front of the player us...") |
mNo edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
The NPC command has a number of parameters which effectively are separate [[NPC]] related commands. | The NPC command has a number of parameters which effectively are separate [[NPC]] related commands. | ||
==Spawn== | |||
Spawn [[NPC]]s in front of the player using the following syntax: | Spawn [[NPC]]s in front of the player using the following syntax: | ||
<code>npc spawn [npc type] [optional name to use for the npc]</code> | |||
The optional name is used to target the NPC with other commands and [[Script|scripts]]. | The optional name is used to target the NPC with other commands and [[Script|scripts]]. | ||
===Kill | ===Spawn Vehicle=== | ||
Kill all spawned NPCs (including vehicles) | Much the same as npc spawn, only to spawn a [[vehicle]]: | ||
<code>npc spawn vehicle [vehicle type] [optional name to use for the vehicle]</code> | |||
==Kill== | |||
Kill all spawned NPCs (including vehicles): | |||
<code>npc kill all</code> | |||
If the player decides to name an npc (or vehicle) by adding the optional name field, or the NPC was given a name by a [[Script|script]] or [[Map|map]], the player can kill the npc with a simple command: | If the player decides to name an npc (or vehicle) by adding the optional name field, or the NPC was given a name by a [[Script|script]] or [[Map|map]], the player can kill the npc with a simple command: | ||
<code>npc kill [optional name specified at spawn]</code> | |||
==Showbounds== | |||
Toggles bounding boxes of all NPCs. | |||
==Score== | |||
Prints the score that each NPC in the world has. You can optionally specify an NPC that was given a script_targetname. | |||
[[Category:Commands]] |
Latest revision as of 11:52, 24 June 2021
The NPC command has a number of parameters which effectively are separate NPC related commands.
Spawn
Spawn NPCs in front of the player using the following syntax:
npc spawn [npc type] [optional name to use for the npc]
The optional name is used to target the NPC with other commands and scripts.
Spawn Vehicle
Much the same as npc spawn, only to spawn a vehicle:
npc spawn vehicle [vehicle type] [optional name to use for the vehicle]
Kill
Kill all spawned NPCs (including vehicles):
npc kill all
If the player decides to name an npc (or vehicle) by adding the optional name field, or the NPC was given a name by a script or map, the player can kill the npc with a simple command:
npc kill [optional name specified at spawn]
Showbounds
Toggles bounding boxes of all NPCs.
Score
Prints the score that each NPC in the world has. You can optionally specify an NPC that was given a script_targetname.