I know that this topic is several years old, but I accidentally posted it in the forum for Multimedia Fusion 2 when I should have discussed it here in Clickteam Fusion 2.5. This question was brought up with some suggestions as to how it could be made possible. However I learn through example so I was wondering if anyone had an example of this or could explain to me how to achieve this result:
It is possible to retrieve the RGB of a pixel at x, y cordinates of objects. And I know it is possible to do so by get RGBAt x, y of window frame. However, if I try to do this, the result is always offset by weird coordinates. Someone said it was because 'get RGBAt' was collecting its data from the frame relative to the entire screen, and if any windows appeared on top of the coordinate being checked, it would throw off the reading and produce the wrong pixel result.
In the same thread, someone mentioned using the surface object to 'blit' the application frame onto it and then get RGBAt from the x, y coordinates of the surface object instead of the actual screen. The problem with this is that I do not know the parameters required to make that possible. In the expression editor, the only parameter that is given is "0 for whole desktop", which essentially is the same as pressing the print screen key on the keyboard. That being said, GetRGBAt x, y of surface object still produces the weird offset problem. I tried this, even moving the surface object to a different location within the frame, and GetRGBAt was still looking at the application frame starting at 0, 0 as if the surface object were still at 0, 0 within the frame (I know this because I was able to collect RGB index values (via counter) from the little red CF2.5 icon that appears in the upper left-handed corner of Clickteam Fusion when the program is at full screen).
Somneone said that it would be easy to read the correct coordinates so that GetRGBAt x, y would correctly read the actual x, y coordinates of the game's frame rather than where it was relative to the entire screen resolution, but I have tried to replicate what I thought worked and have come back empty-handed.
Does a simple example exist where you can blit a section of the game frame into the surface object, and then read RGB values from the surface object without any weird offsets? Or perhaps could someone guide me on the way RGBAt works when it comes to absolute coordinates as opposed to those relative to an object?