How to set the difference between 2 or more copies of the same object?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I'm sure this problem was discussed somewhere in the internet before.

    I have an event, that every time my player collides with the active object, I subtract 1 from his maximum of 100 HP and I have multiple copies of the same object in the scene. When the HP of the object reaches zero I destroy the object.

    So, how can I stop the disappearing of all objects when one HP reaches 0?

    I have a simple event for this: IF HP of Active = 0 then Destroy Active. I think I don't have a selection here, so it destroys every single instance of the Active.

    How should I manage to do this selection?

    Thank you!

  • balazstasi - as long as your condition is using the active object's alterable value for the HP, you should be OK with that Destroy Active event, it will select the active which has HP=0
    HOWEVER - if you've done it as a general comparison of two values and used the active's HP as one value and zero as the other, then it won't do the selection before destroying.
    Another possibility is that you're subtracting 1 from ALL the actives in your player collision event (hard to tell without seeing your mfa file - upload a small example if you can)

    Kevin Ayre Please login to see this link.
    My iOS Apps: Please login to see this link., Please login to see this link. and Please login to see this link.

  • You're welcome! Glad you fixed it (we've all been there and done something similar!)

    Kevin Ayre Please login to see this link.
    My iOS Apps: Please login to see this link., Please login to see this link. and Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!