Getting color numbers at special coordinates

Non-platform specific questions.

Getting color numbers at special coordinates

Postby regis » Sat Jan 08, 2005 10:42 am

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!
Many thanks,
Regis
regis
 
Posts: 48
Joined: Tue Nov 09, 2004 10:51 am
Location: France
Score: 1 Give a positive score

Postby makslane » Sat Jan 08, 2005 6:22 pm

There is no function to get screen RGB.
Can you tell how you want use this function?
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Getting color numbers at special coordinates

Postby regis » Sun Jan 09, 2005 12:38 pm

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!
Many thanks,
Regis
regis
 
Posts: 48
Joined: Tue Nov 09, 2004 10:51 am
Location: France
Score: 1 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest