Help

0 favourites
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hello, I have a two balls (blue and yellow)

    When I throw the ball on blue destroyed hitting the blue, but it rebounds with two yellow explode too, I just want to explode when I throw the ball of each color.

    Not if I explain.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry but could you try to explain it more, or you share a simple example describing your problem ? I don't understand a thing you said, but the fact that balls are thrown...

    I could make a joke about having two balls of not-so-natural color, but that wouldn't fit... (or would it ?)

  • I want my red ball when it launched just explodes with red, but to kick the red, two yellow collide, I want these two balls do not exploit.

    https://www.dropbox.com/s/mt92rduq2ohyy1z/test.capx

  • Ok, let me try to describe what I understood, tell me if I'm right.

    You want :

    • if a yellow ball hits a yellow ball, both balls are destroyed
    • if a red ball hits a red ball, both balls are destroyed
    • if a red ball pushes a yellow ball, and if that makes the yellow balls touch, nothing is destroyed
    • if a yellow ball pushes a red ball, and if that makes the red balls touch, nothing is destroyed

    Am I right ?

  • Exactly, how to do this?

  • You need to save in a variable what was the last ball thrown. If it was red, then the event with yellow balls collision has to be deactivated. If it is yellow, the event with red balls collision has to be deactivated.

    You'll find your project modified with this change as attachment.

  • Guizmus

    Thanks, this perfect I have a doubt like me you can solve.

    When click-on red ball and drag the mouse over the yellow ball I was throwing all the balls. How could I fix this? I tried to change the system of mouse but not work.

    Sorry my English is very bad

  • Help

  • Guizmus

    Thanks, this perfect I have a doubt like me you can solve.

    When click-on red ball and drag the mouse over the yellow ball I was throwing all the balls. How could I fix this? I tried to change the system of mouse but not work.

    Sorry my English is very bad

  • cesarzevil

    What did you try to solve this problem ?

    Did you understand where this comes from ? Look at your events. As you describe it, "When click on red ball and drag over the yellow ball, both balls are thrown". This means that the "trowing" event is also triggered when the mouse goes on top of the yellow ball.

    So if you want the mouse to trigger only the first ball it touches during clicking, you need not to activate the "ivPickedBall" of each ball every tick. Instead, you need to activate only the first ball touched, and then set this boolean to false on touch end.

  • Guizmus

    I put in false and does not work, the drag is the same or I can throw two balls at once.

  • Try everything and still not working, someone help me?

  • Could you show us the Boolean try ? It is the way to go here, it works, based on what you had (I tried ^^). With your try, we could tell you where you made a mistake.

  • Not serve me, because the yellow ball does not move, but if dragged with another red, the two move

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