SGET


sget = "spritesheet get"

 sget( x, y )
x the distance from the left side of the screen (in pixels).
y the distance from the top side of the screen (in pixels).

This function will return the color number (0-15) of a single pixel currently drawn at the (x,y) coordinate specified on the sprite sheet. If you request a pixel that is outside of the screen, then sget will return 0 (zero).


Example:

sset(10,20,8)              --draw at (10,20), a red pixel
pixel_color = sget(10,20)  --returns 8 (red)


Images in this Guide by NerdyTeachers is licensed under CC BY-SA 4.0

1526

3 Nov 2023

Font