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: image (18)

Lua Command imageblend

Categories

Parameters

  • id
  • mode

Info

Changes the blendmode of an image:
  • 0 for normal (pixels are alpha blended, default mode)

  • 1 for light (pixels are added)

  • 2 for shade (pixels are multiplied)

  • 3 for solid (pixels are overwritten, alpha transparency is ignored)


Sample 1: Creating an image and making it glow
local id=image("gfx/sprites/flare2.bmp",0,0,2)
imageblend(id,1)