How do I destroy latest object instead of all objects

0 favourites
  • 4 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • So right now I am making an ammo and reload system, while making it I saw there was a problem with the bullets my player was firing. When "playerAmmo is equal to and less than 0" then "Destroy the object, Bullet". This is in order to make sure that when you keep clicking without ammo the Bullets gets destroyed immediatly. Now my problem is that when you have fired multiple bullets and they are visible on screen the playerAmmo hits 0 and destroys all bullets instead of the latest one. Anyone who would know how I could destroy the latest bullet instead of all bullets at the same time? Thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • A much more sensible way to do this is to only spawn bullets if the variable is >0

  • A much more sensible way to do this is to only spawn bullets if the variable is >0

    I feel stupid. I could do all this and somehow make it work, with a minor problem. Though the answer was so simple. Thank you!

  • You can also try this custom behavior : (but if you intend to learn how to use construct, that's a better idea to do it all by yourself I guess)

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