Page 1 of 1

Getting color numbers at special coordinates

PostPosted: Sat Jan 08, 2005 10:42 am
by regis
Hello to you all,
I wonder how it is possible to get the RBG color numbers (= between 0 and 255 for blue, red and yellow) of a pixel at special coordinates x and y. Does this feature is already implemented under GE or do I have to turn to the C language features? (In this case, do you have any idea how to use the C script in the right way?)
Many thanks!

PostPosted: Sat Jan 08, 2005 6:22 pm
by makslane
There is no function to get screen RGB.
Can you tell how you want use this function?

Getting color numbers at special coordinates

PostPosted: Sun Jan 09, 2005 12:38 pm
by regis
Thank you Makslane for your rapid answer.

Well, I think I have found another way :D

On my project (successive pictures), my goal is to mark some areas of my pictures so that the starship explodes when it enters them. The problem is that these areas are much more complex than a simple square (so that testing x,y coordinates is not a precise enough solution). So, under a graphical tool, I open these pictures and put black color on these areas (then load these new "simplified" pictures under GE and put them under the original ones, using Z-depth): that's why I wanted to test colors during the game.
But there is a much more simple way to do that, using the collide event. Collision areas remain in black, whereas other areas are of transparent color. Because the GE collide function do not apply on transparent areas, my problem is solved and the solution works :idea:

Here again, GE is a great tool which increase productivity!