Commands/Lua

Reference for console commands, Lua hooks and Lua commands in CS2D.

CS2D Command CS2D Console Commands

Category: all (371)

CS2D Command spawnobject

Categories

Parameters

  • type (1-X): object type
  • x (0-X): x pos in pixels/tiles (depending on type)
  • y (0-X): y pos in pixels/tiles (depending on type)
  • rot (0-360): rotation
  • mode (0-X): object mode
  • team (0-X): object team (0=neutral, 1=T, 2=CT)
  • player (0-X): player (creator or for NPCs the type)

Info

Create an object (as server only). Objects are buildings, mines, portals, NPCs etc.

Values depend on the type of the dynamic object.

Object types are:
CS2D Dynamic Objects

When creating NPCs (type 30) the player value is used to set the NPC type:
CS2D NPCs

Attention: Huge numbers of objects can slow down the game and lead to lags!

Lua Hook Lua Hooks

Lua Command Lua Commands