How do I make it so there is a max or min speed

Get help using Construct 2

Post » Thu Dec 26, 2013 9:24 pm

Hi, sorry this is probably a dumb question but I am making a pong like game with multiple paddles on each side where the ball gets faster or slower depending on which paddle the ball hits. Well my question is how do I make it so there is a minimum or maximum speed the ball can go, because right now the ball will either end up going so fast that it glitches out of the room or it could stop moving completely. I cant post screenshots because I just made this account but you can find them at
puu.sh{{{/5ZtQL.{{{png
puu.sh{{{/5Zu6W.{{{png

remove the {{{'s
Hope this isn't against the rules.

Also, if its not too much trouble would someone mind telling me how I would make it so the ball goes through the paddle if it is going through the back of the paddle if that make sense. I hope i'm not asking too much Thank you for any help though.
B
7
S
2
Posts: 15
Reputation: 532

Post » Thu Dec 26, 2013 10:21 pm

try out physics
B
19
S
6
G
3
Posts: 197
Reputation: 4,154

Post » Thu Dec 26, 2013 10:30 pm

Sorry, what does that mean? I kinda know what the physics behavior does but if you could elaborate more that would be very helpful.
B
7
S
2
Posts: 15
Reputation: 532

Post » Thu Dec 26, 2013 10:33 pm

set bullet speed to ball.bullet.speed - (100*ball.bullet.speed >400)

where, in this case, 400 is the slowest speed you want.
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Thu Dec 26, 2013 10:39 pm

concerning going through the back of the paddle (ie one way ) you could look at checking the angle the ball is travelling at and only bouncing it if it is the correct direction ? does that make sense ?
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Fri Dec 27, 2013 8:41 pm

Yeah thanks dude you've helped me a lot, knowing that there are people like you that are willing to help just to help is mind blowing to me. I cant wait to finish this game so I can show you because I haven't fully explained what the game is. I think its an insane idea and my friends think the same but at the same time idk because it is my first game lol like what do I know.
B
7
S
2
Posts: 15
Reputation: 532

Post » Sat Dec 28, 2013 1:58 am

You could also give the ball two variables Min and Max.

When the ball hits paddle A, set speed to Min
When the ball hits paddle B, set speed to Max
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,701


Return to How do I....?

Who is online

Users browsing this forum: WesleyDeveloper9 and 7 guests