sprite_getpixel() gets the color of a sprite's pixel.
• Returns the data in an array, in RGBA order.
• Values are in the 0-255 range.
• Uses buffers, which are fast!
• Automatically handles buffer creation & usage, so it only has to go through the "sprite -> surface -> buffer" process ONCE for each image, resulting in reduced processing overhead.
var arr = sprite_getpixel(sBoi, 0, 2, 4); // (sprite, subimg, x, y)
var color = make_color_rgb(arr, arr, arr);
var alpha = arr/255;
Read the documentation present inside the Scripts for usage instructions.
Removed the need to use
sprite_data_begin() in the start
Version 1.1.0. Published January 9, 2018
Created with GameMaker: Studio v1.4.1773
This asset hasn't received enough reviews yet.
You can only review assets you've bought.
No reviews have been left for this asset - be the first!
Total size 3.2 KB