Bubble shooting game

I can’t send you the code

The variable is set in my first code above

I’m Argonui using the account of Yoyo. (cause only 3 reply for us)
Your first code is just above the second and it’s is not working cause it never write “hit” when the ball crosses eachother.
here a link to the code of collisions and the array of the blue ball :
https://textup.fr/336087HB

my code above write hit all the time, just tested it

please post your entire code

I have to go now, I am sorry

Thx for your help
here’s the whole code :
https://textup.fr/336096hA

the answer is simple

this is the hit code

    for (int i = uniteB.size()-1; i >= 0; i--) {
      bleu ball1 = (bleu) uniteB.get(i);
      if (ball1.isAlive) {
        for (int i1 = uniteR.size()-1; i1 >= 0; i1--) {
          rouge ball2 = (rouge) uniteR.get(i1);
          if (ball2.isAlive && dist(ball1.x, ball1.y, ball2.x, ball2.y) < 7) {
            text("hit", ball1.x, ball1.y);
            ball1.isAlive=false;
            ball2.isAlive=false;
            print("HIT");
          }//if
        }//for
      }//if
    }//for

It uses x,y of the class blue and rouge

BUT you don’t change x,y because of a crazy deplacementR / deplacementB in the class

In my code I got rid of those and put x,y right.

Hence it works

I have to go now, I am sorry

Chrisir

Your posts were blocked as spam. I have approved one of the code posts.

Please format your forum code with highlight + </> button.

Thx man that was so easy to find. Sry for bored you with that i could have find it myself. Thx for all the help really.

Ok jeremy i’ll know it now.

1 Like