I can not figure sht out. :)

0 favourites
  • 8 posts
  • Hi guys,

    I have this missile that has a particle smoke trail attached to itself on creation.

    The problem is when I want it to disappear, it will trigger newer created particles to disappear as well.

    I would love to get some feedback on why it is happening. Link to file below - Thanks :)



  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey Microbex. So, in your current code you are telling the program to destroy all ParticleSmokes whenever that specific condition is met. You either need to get a reference to the ParticleSmoke you want to destroy (e.g.: check for the object's UID, store a variable referencing the object, etc) or you can try to implement a Container.

  • I did try containers, but that will delete all the elements in the container and not only the smoke.

    I was not so lucky with the UID either, but I will give it a try again. Thanks

  • Hmm, I am not sure of anything anymore. I just can't get it to work.

    Tried serval ideas. Made a FSM for the particle smoke and triggered by distance traveled of the Missile.

    Then I gave the particle the UID of the projectile and tried to destroy it with its Missile counterpart. It did not work either.

    How would you guys go around this setup?

  • I would do a similar approach. I would create a variable in ParticleSmoke, like projectilesUID. Then on Projectiles | On created event, pass the Projectiles UID to that variable.

    Finally, after this event of yours:

    Projectiles | StateFSM = 2

    Projectiles | DistanceTravled >= 2000

    Add a sub-event with the following:

    ParticleSmoke | projectileUID = Projectiles.UID -> ParticleSmoke | Destroy

  • I did exactly what you did before reading your comment, but still not working. I can not get my head around it. Could it be because of the Repeat/Loopindex?

  • Here's what I've done:

    (I'm not being able to upload images)



    At least, it worked for me.

  • I got it working. Seems I made it more complicated as needed. Thanks!

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