Commands/Lua

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

CS2D Command CS2D Console Commands

CS2D Command effect

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

Attention: Spawning a big amount of particles can have a negative impact on performance!

Lua Hook Lua Hooks

Lua Command Lua Commands