How do I destroy after the second instance?

0 favourites
  • 4 posts
  • C3/Mobile App.

    For those of you keeping up - Yes, I am working on 3 games at once - I am also building 2 websites - I have ADHD - It's a superpower!

    I need to know if am I Close? Am I on the right track?

    Ok, so the toxic blobs are coming down the shaft and thanks to blackhornet, I'm able to grab them and move them around.

    When the blue toxic blob comes in contact with the green toxic blob the blue blob is destroyed. When the green blob comes in contact with the purple blob the green blob is destroyed.....

    .... and here is where it gets tricky folks .... I want the purple blob to be destroyed after the Second green blob hits it.

    The thing is there could be any number of red, green and purple blobs on the screen at one time.

    I thought of setting up an instance, but then I saw 'nth instance' and ..... well, am I close or not in the right ball park? Please see code below in the image.

    Thank you for all your help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You want a hit-counter on the purple blob. When green hits, increase the counter. If the counter reaches 2, destroy.

  • This looks like some sort of cascading destroy mechanism. Not sure if it's exactly 100% the same, but I also do something like a cascading destroy in by bubble shooter game were other bubbles need to be destroyed once another bubble is destroyed; It uses a recursive function.

    youtu.be/Skc7JJOYSOI

    Maybe that can be of any help

    Cheers

  • blackhornet bartalluyn,

    Thank you both. I think I finally have it working.

    You guys are amazing!

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