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)
imagescaleCategories
Parameters
- id
- x
- y
Info
Changes the image scale factors (in other words: the image size).
Note: x and y are factors and default to 1 (original image size). 2 would be double the size, 0.5 half the size etc.
Note: If the image is a light, x will be used as factor for the light radius. y will be ignored. See image for details!
Sample 1: Creating an image and changing its look and position/rotation
local id=image("gfx/sprites/flare2.bmp",0,0,2)
imagecolor(id,255,255,0)
imageblend(id,1)
imagealpha(id,0.5)
imagescale(id,2,3)
imagepos(id,30,30,45)
Categories
Parameters
- id
- x
- y
Info
Changes the image scale factors (in other words: the image size).
Sample 1: Creating an image and changing its look and position/rotation
Note: x and y are factors and default to 1 (original image size). 2 would be double the size, 0.5 half the size etc.
Note: If the image is a light, x will be used as factor for the light radius. y will be ignored. See image for details!
Sample 1: Creating an image and changing its look and position/rotation
local id=image("gfx/sprites/flare2.bmp",0,0,2)
imagecolor(id,255,255,0)
imageblend(id,1)
imagealpha(id,0.5)
imagescale(id,2,3)
imagepos(id,30,30,45)
imagecolor(id,255,255,0)
imageblend(id,1)
imagealpha(id,0.5)
imagescale(id,2,3)
imagepos(id,30,30,45)