How do I reference objects?

Get help using Construct 2

Post » Sun Jun 29, 2014 11:09 pm

I'm not sure if this is what I'm looking for, but I think my problem is that I can't find out how I reference other objects.

I want to destroy only the particles that are pinned to a bullet object when the bullet is off-screen, but the system destroys all of the particles when one of the bullets is off-screen.
So it works well when you only have 1 bullet on-screen, but if there's more than 1 bullet, the fire effects of the other bullets are also getting removed.

So what I want is to only destroy the objects that are pinned to the bullets that are not on-screen.

I'm not very good at explaining my problem, but here's a .capx I've created in 5 minutes to demonstrate my problem: https://www.mediafire.com/?zyrrpu58rubrjd8 (remember to open "Layout 1" before running the project, I always have different "storage" layouts to store the objects that need to be created by the system.)

I hope someone can help me out.
B
6
S
1
Posts: 18
Reputation: 438

Post » Sun Jun 29, 2014 11:26 pm

Make the bullet and particles a container. They get created and destroyed together.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Mon Jun 30, 2014 12:05 am

Here's more information about "families" in construct 2 and how they work:
https://www.scirra.com/manual/142/families

I think that'll help you along.
B
6
S
1
Posts: 73
Reputation: 571

Post » Mon Jun 30, 2014 12:39 am

Thanks codah and rezagamertag, I will look more into the things both of you've mentioned. Creating a container seemed to do the trick :)
B
6
S
1
Posts: 18
Reputation: 438

Post » Mon Jun 30, 2014 1:27 am

Cool
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests