How to use read pixels extension

Hi and welcome plur4ik.

That’s a good question as it’s not listed directly in the conditions or actions. The ways I’ve used it is to save the read pixel values where the cursor position is to a text object or a variable or to directly change the colour of another object to the one where the cursor is.

So, in the action to change a variable, you would click on the purple 123 button and use one of the readpixel expressions.

You don’t say how you plan to choose which pixel is read, but say it was at the cursor position, than you would have to compare the readpixel value to the one that increases money. From memory this can get tricky because the extension saves the colour into three separate RGB values.

Here is one way I’ve used the extension and you can see I had to join the RGB values together.

Have a play with it and see how you go and check back here if you need more help.

2 Likes