Like topic says, I'm currently making smb2 styled game, where player can pick up items/things or enemies and throw them. I have implemented throw -mechanic in the game and it is working fine :)
Now I'm implementing destroying -mechanic. Throwing an item against an enemy will destroy the enemy. That was an easy task to make to implement BUT I'm having a hard time figuring out how to do the same with the enemy. I mean, when player throw an enemy against another enemy, both of them should be destroyed (like in smb2). I can destroy the enemy which was thrown, because I have set an boolean variable, which tells when enemy is picked up (actually picked up in-game) but I can't destroy the other enemy (the one which receive the hit and is on the ground).
I'm using families on items and enemies. Both are in their own families. I know I have to tell construct 2 which enemy is receiving the hit and that is the problem. I can't figure out how I can pick that enemy, who was walking on the ground. I feel like I have tried everything. I have tried to put destroying -mechanic into a function, set another boolean, pick nearest enemy which was not thrown etc and nothing works like I want to.
My current events looks something like this:
1# items -family: is picked up, on collision with enemies -family = destroy enemies -family.
2# enemies -family: is picked up, on collision with enemies -family = destroy enemies -family.
I hope my mumbling makes sense. Anyone want to help me out with this one? I would really appreciate any kind of help ^^