Commands/Lua
Reference for console commands, Lua hooks and Lua commands in CS2D.
- Console Commands are entered in console, executed with key-binds, cfg-files or with Lua parse
- Lua Hooks execute Lua when events occur - some have a return value which can change the game behavior
- Lua Commands are used to retrieve game data or to perform actions in Lua scripts
CS2D Console Commands
effectCategories
Parameters
- effect (text): effect type
- x (0-X): x position in pixels
- y (0-X): y position in pixels
- p1 (0-X): parameter 1 (amount in most cases)
- p2 (0-X): parameter 2 (radius in most cases)
- r (0-255): color red
- g (0-255): color green
- b (0-255): color blue
Info
Creates particle effects on the map. The usage of the parameters depends on the type. You can use r,g,b to define a color for some of the effects (use a colorpicker to get the values). However this doesn't work for all effects! See list below for details.
The amount is limited to a maximum of 100 in most cases!
"fire"
fire particles (yellow/orange/red).
p1=amount (max 100), p2=radius
r,g,b=no influence!
"smoke"
smoke particles (gray).
p1=amount (max 100), p2=radius
r,g,b=no influence!
"blood"
blood effect (red).
p1=amount (max 35), p2=spray velocity (only affects about 1/3 of the particles)
r,g,b=no influence!
"flare"
flare particles in defined color.
p1=amount (max 100), p2=radius
r,g,b=color
"colorsmoke"
smoke particles in defined color.
p1=amount (max 100), p2=radius
r,g,b=color
"sparkles"
sparkle effect in defined color.
p1=amount (max 50), p2=no influence!
r,g,b=color
Attention: Spawning a big amount of particles can have a negative impact on performance!
Lua Hooks
Lua Commands
Categories
Parameters
- effect (text): effect type
- x (0-X): x position in pixels
- y (0-X): y position in pixels
- p1 (0-X): parameter 1 (amount in most cases)
- p2 (0-X): parameter 2 (radius in most cases)
- r (0-255): color red
- g (0-255): color green
- b (0-255): color blue
Info
Creates particle effects on the map. The usage of the parameters depends on the type. You can use r,g,b to define a color for some of the effects (use a colorpicker to get the values). However this doesn't work for all effects! See list below for details.
The amount is limited to a maximum of 100 in most cases!
"fire"
fire particles (yellow/orange/red).
p1=amount (max 100), p2=radius
r,g,b=no influence!
"smoke"
smoke particles (gray).
p1=amount (max 100), p2=radius
r,g,b=no influence!
"blood"
blood effect (red).
p1=amount (max 35), p2=spray velocity (only affects about 1/3 of the particles)
r,g,b=no influence!
"flare"
flare particles in defined color.
p1=amount (max 100), p2=radius
r,g,b=color
"colorsmoke"
smoke particles in defined color.
p1=amount (max 100), p2=radius
r,g,b=color
"sparkles"
sparkle effect in defined color.
p1=amount (max 50), p2=no influence!
r,g,b=color
The amount is limited to a maximum of 100 in most cases!
"fire"
fire particles (yellow/orange/red).
p1=amount (max 100), p2=radius
r,g,b=no influence!
"smoke"
smoke particles (gray).
p1=amount (max 100), p2=radius
r,g,b=no influence!
"blood"
blood effect (red).
p1=amount (max 35), p2=spray velocity (only affects about 1/3 of the particles)
r,g,b=no influence!
"flare"
flare particles in defined color.
p1=amount (max 100), p2=radius
r,g,b=color
"colorsmoke"
smoke particles in defined color.
p1=amount (max 100), p2=radius
r,g,b=color
"sparkles"
sparkle effect in defined color.
p1=amount (max 50), p2=no influence!
r,g,b=color
Attention: Spawning a big amount of particles can have a negative impact on performance!