Collision Logic Problem

Hello everyone,
I have a simple problem.
I am making a pong game.
It has 2 objects as a border.
I want the ball to bounce when hitting the border.
I used an angle variable (adding and subtracting the angle to shoot the ball at a different direction), but I had a very simple problem.
I used an event where when the ball collides with the border, it adds or subtracts the angle variable.
However, since the event happens when the ball collides with the border, it repeatedly adds or subtract.
To be more clear, the ball adds or subtracts the angle variable forever when the ball collides with the border.
I want it to add or subtract the angle variable only once.
If you genius minded people have any logical solution to this problem, please tell me immediately.
Thank you,
Foreverip
Edit:
Here is a bit of my code for you to understand what I mean.
Condition: When Ball Touches Border
Event: Add/Subtract Variable:Ball_Angle
Hope this helps :slight_smile:!
Edit 2:
Found a super complex result. Took me 2 hours. If you have the same problem, just ask me :slight_smile:!

I don’t know if it’s super complex, but I would have made something like this :
Add a variable named borderID in the object ball, where you save the border number from which it has collided.

Add a variable borderID in each border, set from 1 to 6 (4 borders + 2 players).

Make an event :
If ball.borderID != borderGroup.borderID and ball in collision with borderGroup then
do the rebound and ball.borderID = borderGroup.ID

That way, the ball will rebound only once on the same border.
It needs to rebound on another border to be able to rebound again on the previous one.

sorry, I never noticed there was a trigger once while true condition. Whoops :slight_smile:

Here is a topic about Brick game with links to tutorial and couple of versions of it:
viewtopic.php?f=19&t=5120&start=10
And I found a Breakout game example in GD.