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

CS2D Command CS2D Console Commands

Lua Hook Lua Hooks

Lua Command Lua Commands

Lua Command imageframe



  • id
  • frame


Changes the frame of a spritesheet. If the image is not a spritesheet, does nothing. Frames start at 1. If you attempt to set the frame index to lower than 1 or larger than the maximum number of frames, the frame will be set to the first or last frame respectively.

Sample 1: Creating a player spritesheet and switching it to the claw animation
local id = image("<spritesheet:gfx/player/t1.bmp:32:32:m>",2,0,201)