Problem with two actors that overlap
akimann
Member Posts: 62
First, please excuse my bad english:-)
I have a the following problem:
I do have two actors that overlapp. Each actor should change his image when I click on it.
When I click on the actor which is in front but in the area where the two actors overlap, the actor behind it
also change his image (but he shouldn´t do that).
For example: Imagine a pianokeyboard: the "black-key-actors" overlapp the white keys. When I press the black key it should change his image to a "downpressed" key. But because the black keys overlapp the white once, the white key show also his "pressed down image" also the isn´t touch during gameplay.
How can I solve this problem...
Hope you can help me an greatings from Germany!
Alex
I have a the following problem:
I do have two actors that overlapp. Each actor should change his image when I click on it.
When I click on the actor which is in front but in the area where the two actors overlap, the actor behind it
also change his image (but he shouldn´t do that).
For example: Imagine a pianokeyboard: the "black-key-actors" overlapp the white keys. When I press the black key it should change his image to a "downpressed" key. But because the black keys overlapp the white once, the white key show also his "pressed down image" also the isn´t touch during gameplay.
How can I solve this problem...
Hope you can help me an greatings from Germany!
Alex
Comments
In that template should be the code you will need to solve your issue. Sorry I didn't create the template so I'm not familiar with how it works.
Greetings from Canada!
set it to false
when touch is press AND attribute change is false then change image to ...and change attribute change to true( set this in the white key board)
when touch is press AND attribute change is true then change image to...and change attribute change to false( set this in the black key board)
Thank you very much for your help. That solved my problem and makes me smile:-)
Alex