Picking instance-related particles

0 favourites
  • 3 posts
From the Asset Store
Particles support animations, collisions, effects and etc.
  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

  • Thanks!! That works like a charm!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)