How do I do advanced Pinning

Get help using Construct 2

Post » Fri Mar 18, 2016 8:21 pm

Message: doodwal21 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
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

https://drive.google.com/open?id=0BxnRg ... 1l5Wm12MU0
B
3
Posts: 3
Reputation: 181

Post » Fri Mar 18, 2016 8:24 pm

Either use containers, or store the barrel UID in the tank, so you can pick it on tank destroy, so you can destroy it.
ImageImageImage
B
71
S
21
G
231
Posts: 3,691
Reputation: 129,358

Post » Fri Mar 18, 2016 8:41 pm

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 -
Image
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
B
14
S
2
Posts: 35
Reputation: 789

Post » Fri Mar 18, 2016 8:44 pm

I cannot add to blackhornet's advice; they are your only options for reliable management of your game objects being destroyed with each other...
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,208
Reputation: 43,838

Post » Fri Mar 18, 2016 11:58 pm

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...
B
9
S
3
Posts: 56
Reputation: 801


Return to How do I....?

Who is online

Users browsing this forum: David181, evillair and 59 guests