Fandom

Pico-8 Wiki

Sset

162pages on
this wiki
Add New Page
Comments0 Share
sset( x, y, [c] )

Sets the color value of a pixel on the sprite sheet.

x
The x coordinate on the sprite sheet.
y
The y coordinate on the sprite sheet.
c
The color value to set. If unspecified, the color of the current draw state will be used.

This is similar to pset() except instead of the graphics buffer, it gets the color value from the sprite sheet. The sprite sheet is treated as a single canvas 128 pixels wide and 128 pixels high.

If the bottom half of the sprite sheet is used for map data, sset will modify map data values for that region. Prefer mset() for setting map data.

Drawing to the sprite sheet changes the data in memory, but does not change the cartridge. A program can restore the original data from the cartridge with reload(), and can save the modified data to the cart with cstore(). See Memory for information about the memory addresses to use.

Examples Edit

sset(10, 10, 7)      -- sets (10, 10) to white
print(sget(10, 10))  -- prints 7

See also Edit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.