How do I control speed jump on the platform behavior?

Get help using Construct 2

Post » Fri Feb 06, 2015 7:03 pm

I'm trying to limit the top speed of the player with the platform behavior. using "max speed".

When the player is pressed left or right on the keyboard he accelerates to the stipulated maximum speed, but when it jumps a new speed count is aggregated with current ultrapassadno the limit.

There is another way to control the speed of the platform behavior, which is not the "maximum speed"?

I apologize for any inconvenience and thank you for your attention
B
12
S
1
Posts: 22
Reputation: 536

Post » Fri Feb 06, 2015 8:11 pm

I haven't done a platformer in a while but you could check when they press jump at max speed to prevent the jump or something.. Or you could just make your own jump mechanic in the event sheet?
Nothing goes unanswered!
B
22
S
5
G
1
Posts: 430
Reputation: 3,383

Post » Fri Feb 06, 2015 9:14 pm

My idea was to show a progress bar that marks the character's current speed and as to acquire specific items, speed limits were increased. Construct seems to use a independete speed for X and Y coordinates, if you move during the jump, the two values are aggregated .

My project needs the player never exceeds the maximum speed of 300.

I made a simple design with one sprite object assuming platform behavior, set to "max speed: 300" "every tick >> Set text: sprite.platform.speed" I realized that when the character moves in the X increases its speed to the limit set, but when he jumps, exceeds this value easily to more than double.

I must say that this exedente on speed value occurs only during the jump, returning the speed of 300 normally to return to the solid platform object.

I know of no way to deal with this problem in construct 2, I tried to change the gravity and jump strenght, but only interfere with the distance traveled and not on speed, tried to use custom motion platform with vector, but the result is the same.
B
12
S
1
Posts: 22
Reputation: 536

Post » Sat Feb 07, 2015 1:34 am

Could you slow the x component of the velocity while in a jump? So every tick when a jump is in progress, calculate the Y component then set the X component to sqrt(maxspeed^2 - yspeed^2)
Nothing goes unanswered!
B
22
S
5
G
1
Posts: 430
Reputation: 3,383

Post » Sat Feb 07, 2015 1:54 am

You can try
Speed ≤ MaxSpeed >> Set Text: Sprite.Platform.Speed

You wouldn't need the every tick condition.

You ofcourse could use that for your other actions rather than setting text.
B
30
S
7
G
2
Posts: 100
Reputation: 2,460

Post » Sat Feb 07, 2015 1:34 pm

@briggybros
Do not know much about formulas, you speak in caucular vector x and y, or x and y position, could you elaborate? grateful!

@thatserafimkid
It is a palliative great, until I can find a way to edit the jump speed I'm using your tip, thank you!
B
12
S
1
Posts: 22
Reputation: 536


Return to How do I....?

Who is online

Users browsing this forum: Magistross and 0 guests