Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Is it possible to get current color of a sprite based on the pointer x and y position?

Author
Message
2D Analyst
AGK Developer
15
Years of Service
User Offline
Joined: 2nd May 2004
Location:
Posted: 6th Jan 2019 17:12
I am aware of the getSpriteColorRed, getSpriteColorBlue and getSpriteColorGreen commands, but it will not give what I need. I have a sprite with only two possible colors and I want to know if there's a built in function that will detect the colors within the same sprite from the pointer x and y?

For example: I highlight the mouse cursor on the sprite and want to return the RGB value.

If this is not possible, what work around can be used to accomplish this?
2D Analyst
AGK Developer
15
Years of Service
User Offline
Joined: 2nd May 2004
Location:
Posted: 6th Jan 2019 17:45
I found the below function doing a search in this forum. It gives me what I needed!

Login to post a reply

Server time is: 2019-06-19 10:57:59
Your offset time is: 2019-06-19 10:57:59