- Home /
 
 
               Question by 
               Kim_Lichtenberg · Apr 06, 2019 at 12:10 PM · 
                2d2d game2d sprites2d-gameplay  
              
 
              How to make a sprite respond to a specific color?
Hi guys, I want to make a sprite based 2D game where you have to escape from enemies. Not a very bright idea, but the ‘twist’ is that the character can hide from the enemies. If he has a red hat on his head, he can hide if he stays on a red surface. With a yellow hat he’s safe on yellow surface, and the same for his blue hat.
I’ve imported the hats as sprites. My question is, how I can work this out. I want to make the hats respond to the colour of the surface and the enemy respond to the character in such way that if the character has his red hat on and stands on the red surface, he’s invisible for the enemy and they simply pass through the character.
Many thanks for helping :)
               Comment
              
 
               
              Your answer