How do I destroy one, but not the other? To destroy or not to destroy - that is the question.

0 favourites
  • 3 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • C3/Mobile Game

    Can I get some help thinking this one through please?

    It’s a simple sorting game, but with a twist - the balls generate every X seconds from the bottom, pushing the other balls up. If the Balls reach the top, you lose. That part I’ve got - everything is populating well.

    What I need is when the blue ball is on collision with the green ball, the blue ball is destroyed - That part I got.

    BUT when the green ball is on collision with the blue ball, I need the program to do nothing.

    1. How do I tell C3: Don’t destroy?

    2. The other question is, as the balls auto generate every X seconds, how do I get the blue balls not to destroy if a green ball generates below them?

    Right now if a green or blue ball generates under a green or blue ball, the blue ball is automatically destroyed - I need that to stop.

    As I go, the green balls will be destroyed if they touch the red balls …. and I’ll be honest, I’m not sure how I’m going to destroy the red balls. I’m thinking if 2 green balls are destroyed on the red ball then the red ball is destroyed on the second destroyed green ball. But first things first.

    PS - All the sprites are giant/over sized/big - this is slapped together so I can learn how to do it.

    The C3: drive.google.com/file/d/1fLSIQo5nVof8rs0Xo7JDyeNfBg5YyAvK/view

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • von Perkele,

    Thank you for your reply.

    The file opened, but it didn't always kill the blue ball when it fell on to the green ball, BUT it did give me an idea.

    I made each of the collision polygons a bit smaller around the balls. Then I set the amount that the balls move up to sprite.Y + the grid size. Now the collision polygons are smaller than the grid, so it seems to be setting them within the grid and not on top of each other.

    When I drop them in to the squares there are no grid size rules for the balls to follow so they fall straight down on each other. Thus far it's worked, but I'm going to do more testing tonight.

    I don't know if that's the right way to do it or if that's the sloppy way to do it. But I actually came up with the "sprite.Y + the grid size" on my own, so I'm taking today as a win!

    Thanks again.

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