Picking instance-related particles

Get help using Construct 2

Post » Thu Jun 22, 2017 12:49 pm

Hello!

This is the thing. I usually use families when I want an object to be made of different sub-objets, but with particles it doesn't work well.

Picture an arrow with a smoke trail that is created with particles. I want the trail to stop spraying when the arrow is destroyed, but using families causes the smoke to suddenly disappear (because it destroys itself, instead of stop spraying).

My logic would go like:

- The arrow is shot.
- Arrow spawns a trail and pins it.
- The arrow hits a wall, it breaks and the trail stops spraying.
- After a few seconds, the trail object is destroyed.

Now, if I set "pick trail instance nearest to arrow" it works until I shot an arrow twice exactly in the same spot. The position the trail is looking for is the same for both arrows, so I end up with several floating trails that never stop spraying.

I never really understood how the picking system works. Any help will be appreciated! :)

Thanks and best regards.
B
5
S
1
Posts: 34
Reputation: 512

Post » Thu Jun 22, 2017 3:18 pm

On (arrow) collision with (Wall) <--- picks the correct arrow, and does it only once, i assume that you know how to stop it
System > Pick by comparison ... Trail .. Trail.UID = Arrow.PinnedUID <-- picks the pinned trail (if only 1 pinned)
____________actions .... whatever you wanna do with those 2 picked objects
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Tue Jun 27, 2017 2:34 pm

Thanks!! :D That works like a charm!
B
5
S
1
Posts: 34
Reputation: 512


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests