I have pinned enemybarrel to enemytank and when any one the tank is destroy the barrel from all other gets instances(clones) of enemy gets destroyed.
Can anyone please see this link and solve this pinnig Issue.
Contruct2 version 221
drive.google.com/open ... 1l5Wm12MU0
Either use containers, or store the barrel UID in the tank, so you can pick it on tank destroy, so you can destroy it.
The link doesn't seem to be working so I'm gonna use the one from your last thread.
You could do whatever blackhornet is talking about or you could just do this -
It will destroy the barrel and whatever enemy that barrel is overlapping.
But if an enemy is overlapping another enemy ( https://i.gyazo.com/74ee6556ae694ae46d6 ... 829f7a.png ) and you shoot him then you'd destroy the other enemies barrel too. To fix that you could just make the collision on the barrel smaller ( https://gyazo.com/62dcb8b41525aa2c8658ee7b3eca709c ) so it doesn't collide with other enemies.
Here's a capx https://www.dropbox.com/s/r1dg14ub9txm2 ... .capx?dl=0
I cannot add to blackhornet's advice; they are your only options for reliable management of your game objects being destroyed with each other...
Develop games in your browser. Powerful, performant & highly capable.
could you give your tanks an instance variable such as a number and do the same with the barrels. Then when tank # 201 is destroyed then barrel 201 can be destroyed too..
You could also use Pin behavior and if the barrel is pined to the tank then it will be destroyed...