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
Lua Hooks
Lua Commands
Category: image (18)
imagecolorCategories
Parameters
- id
- red
- green
- blue
Info
Changes the color of an image (use a colorpicker to get the values).
The color is specified as red, green and blue values. Each ranging from 0 (black) to 255 (full color brightness).
Sample 1: Creating an image and making it green
local id=image("gfx/sprites/flare2.bmp",0,0,2)
imagecolor(id,0,255,0))
Categories
Parameters
- id
- red
- green
- blue
Info
Changes the color of an image (use a colorpicker to get the values).
The color is specified as red, green and blue values. Each ranging from 0 (black) to 255 (full color brightness).
Sample 1: Creating an image and making it green
The color is specified as red, green and blue values. Each ranging from 0 (black) to 255 (full color brightness).
Sample 1: Creating an image and making it green
local id=image("gfx/sprites/flare2.bmp",0,0,2)
imagecolor(id,0,255,0))
imagecolor(id,0,255,0))