Make ball speed velocity increase if lower than 50

Get help using Construct 2

Post » Mon Jun 03, 2013 7:00 pm

I'm doing a pong game and the speed of ball sometimes when hit is too slow, I would like to increment the speed by 10% if the ball speed goes below 50. I don't see no compare speed or compare physics variables.

So I'm a bit stuck.

Thank you.
B
4
S
1
G
1
Posts: 53
Reputation: 858

Post » Mon Jun 03, 2013 7:13 pm

Use "compare two values" from the system condition. Since you probably have only one ball, you don't have to worry about picking the right instance, so simply compare ball.physics.yourVariable and 50.
B
76
S
31
G
27
Posts: 1,015
Reputation: 20,790

Post » Mon Jun 03, 2013 9:43 pm

[QUOTE=Magistross] Use "compare two values" from the system condition. Since you probably have only one ball, you don't have to worry about picking the right instance, so simply compare ball.physics.yourVariable and 50.[/QUOTE]

Thanks Magistross.

I used System -> ball.Physics.VelocityX = 0.05 -> Ball -> Apply Physics impulse 0.08 toward (0,0) at image point 0.

It seems to use decimals instead of big numbers.

It seems to do the job, in an awkward way ^^

Please let me know if it needs tweaking.


Web Demo
B
4
S
1
G
1
Posts: 53
Reputation: 858


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 27 guests