Overlapped Ingame sprites with different actions ?

Get help using Construct 2

Post » Wed Jul 31, 2013 5:36 am

Hi

Ive searched the forum about the overlapping objects, but didnt solve my problem.

For example when user clicked on Player Object, a menu will popup with selections for upgrade buttons or etc. But the user can also click on the enemy sprite and another menu will popup and for example maybe display enemy information with button close.

Now during gaming this so called popup menu can overlapped each other for example and user might click on button close enemy information popup and the event of Player upgrade button might be fired since both are overlapping.


So I was thinking that I just group all controls of the menu and put into a Family
Then when user clicked or Touched on Family objects, I just pick top instances and do some events based on button type. Correct ?

But how do I know which is clicked or Touched ? I have to declare Instance variable for the family as identifier? Is this the only way ?

Are there any more elegant way to do this ?



Some example

https://dl.dropboxusercontent.com/u/65841566/TestOverlap.capx

Thanks

B
64
S
21
G
14
Posts: 386
Reputation: 11,843

Return to How do I....?

Who is online

Users browsing this forum: dokthor, JaredX, Monkin8r and 12 guests