Destroy or move ball that is stuck bouncing on Y

Get help using Construct 2

Post » Tue Jun 04, 2013 12:47 am

Hi,

Im doing a PONG game, so far so good except that sometimes the player controlled movements cause the ball to keep bouncing only vertically on Y axis. It wont reach the other player and the only choice is to refresh the page.

Here's the DEMO

How can I set that IF the ball is not moving fast enough towards X movement it should move faster OR be destroyed OR do something exiting?

Sample of script:




Download the Project Herelonrot2013-06-04 00:48:49
B
4
S
1
G
1
Posts: 53
Reputation: 858

Post » Tue Jun 04, 2013 1:10 am

if Ball.VelocityX = 0
-> set Ball.VelovityX to random(0.2, 0.5)

Numbers were just guesstimates, you'll probably have to change them.
B
47
S
14
G
7
Posts: 603
Reputation: 8,151

Post » Tue Jun 04, 2013 1:54 am

Thank you @EncryptedCow

It doesn't seem to work very well. the ball looses trajectory and becomes void of much movement and rotation.lonrot2013-06-04 03:30:23
B
4
S
1
G
1
Posts: 53
Reputation: 858

Post » Tue Jun 04, 2013 3:30 am

try applying a force in a diagonal direction then.
B
47
S
14
G
7
Posts: 603
Reputation: 8,151

Post » Tue Jun 04, 2013 8:25 am

[QUOTE=EncryptedCow] try applying a force in a diagonal direction then.[/QUOTE]

I can't find that instance.
B
4
S
1
G
1
Posts: 53
Reputation: 858

Post » Thu Jun 06, 2013 1:31 am

Any advice on this?
B
4
S
1
G
1
Posts: 53
Reputation: 858


Return to How do I....?

Who is online

Users browsing this forum: NN81, Seruza and 10 guests