Commands/Lua

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

CS2D Command CS2D Console Commands

Lua Hook Lua Hooks

Lua Command Lua Commands

Category: all (86)

Lua Command imagescale

Categories

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)