display.colorSample on invisible image

Hello, first of all - thanks for this great game engine for making our crazy games.

I make the game with world map and selectable countries in the map. I have 1 layer with visual map and invisible layer with mask, where all of the countries painted in diffirient colors. And I thought a mask layer will be selected by using the display.colorSample method, but nothing happens. When I select pixel in the game - method picks a color of visual layer, not helper image-layer. Because colorSample working only for visible images in the layout. 

What other solutions to my problem? I will be extremely happy, i’m stuck on this problem.

Hi @GabrielKnight,

Can you please post the relevant code that you’re using so the community/staff can try to help you? We’ll need to see how you’ve set up the map, the mask, and how you’re using display.colorSample().

Thanks,

Brent

Hi @GabrielKnight,

Can you please post the relevant code that you’re using so the community/staff can try to help you? We’ll need to see how you’ve set up the map, the mask, and how you’re using display.colorSample().

Thanks,

Brent