• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Logic Error?

J

Jac Thiebeau (Cyberhroom)

Guest
I am using 1.4 for a simple pong clone however, there seems to be an error in my DnD for scoring. The idea is that if person A scores 1000 points then person B loses 500 points and vise versa. However, I have the error in which if a person has 0 points and the other scores the person who scores gets 1000 but also the person who was to lose 500 gains 500.

upload_2018-10-2_22-25-59.png

Thanks in advance!
 
B

Bayesian

Guest
the person who was to lose 500 gains 500.
The only way I could see that happening is if both are getting +1000 and then the person scored on gets -500. Though I don't know how that's happening. The only issue I see with your DnD is that the if y<0 has an else that will be triggered every frame. It should be an else if y > room_height
 
J

Jac Thiebeau (Cyberhroom)

Guest
Also make sure "Relative" is marked in each of those scoring actions.
They are all relative but I think the issue might be if the ball bounces into the left side of the screen into Red's goal then Red still gets the point not blue. Which idk exactly how that works but just gonna scrap this and try again.
 
J

Jac Thiebeau (Cyberhroom)

Guest
I went and made it as if person B does not have 0 points subtract 500 so it now works!
 
Top