
Help
Command Reference
You can enter CS2D script commands in the console, save them in cfg-files or bind them to keys. CS2D script commands are no Lua commands but they can still be executed in Lua scripts by using the Lua parse-function!
Commands
Category: server (179)
spawnnpc
Categories
server
Parameters
- type (1-X): npc type
- x (0-X): x pos in tiles
- y (0-X): y pos in tiles
- rot (0-360): rotation
Info
Create an NPC (as server only).
NPC types:
1 - zombie
2 - headcrab
3 - snark
4 - vortigaunt
5 - soldier
NPC types:
1 - zombie
2 - headcrab
3 - snark
4 - vortigaunt
5 - soldier
Note: NPCs are actually objects as well - with type 30. the type of the NPC is saved in the player attribute of the object. So you could also use spawnobject with proper parameters to create NPCs.
Attention: Huge numbers of NPCs can slow down the game and lead to lags!






