Angle Jumping

Get help using Construct 2

Post » Mon Sep 09, 2013 11:50 pm

So im trying to make my character have different jumping behaviors depending on weather she's standing still or running. When she's standing still, she jumps straight up and fall straight down, but when she's running, i'm trying to have her jump in a pre-determined arc that is not effected by the platform movement, ie. regardless of the keys pressed mid-air, as long as she is running (or if running/idle to running animation is playing) and the jump button is pressed, she will always jump in an arc, same distance, same speed, same everything. I've been messing around with the "move at angle" and "set angle for gravity" actions, but these just have me teleporting me all over the place so clearly I have no idea how these actions works. If anyone can help, it'd be much appreciated. Capx link is below


https://www.dropbox.com/s/lyr8fkwro5sl7hq/JumpingProblems.capx
B
6
Posts: 25
Reputation: 300

Post » Tue Sep 10, 2013 12:23 am

I had a look and I'm not sure what you mean by jump in an arc. If it's a different animation can't you just play it when that type of jumping is happening?
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Tue Sep 10, 2013 1:32 am

@plinkie

[QUOTE=plinkie] I had a look and I'm not sure what you mean by jump in an arc. If it's a different animation can't you just play it when that type of jumping is happening?[/QUOTE]

Here is an image of what Im trying to do movement wise, specifically the flat jump is what im aiming for.

http://imageshack.us/a/img716/5922/nybitmappsbildz.png

And I do have a separate animation for that specific jump, in the capx its labeled Runjump. But what Im trying to do is have the running jump move in a specific pattern. Unlike a normal jump which is affected by things like momentum, gravity, running speed, etc, I need the running jump to move in the arc pattern everytime, unaffected running speed, gravity, etc.CDAfree2013-09-10 01:33:34
B
6
Posts: 25
Reputation: 300

Post » Tue Sep 10, 2013 1:50 am

You can set up the character's gravity, acceleration, deceleration etc when you do that type of jump.
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Tue Sep 10, 2013 4:39 pm

@plinkie

okay, so messing with jump strength and gravity, i can get my character to jump in a high arc, like the high jump in the picture. but Im trying to get her to do something more akin to the flat jump. The way I see it, there are two ways to go about it.

1. I need to program something similar to a sudden increase in forward momentum right before each running jump. The easy way to do this would be to have the character have a fast running speed, but I like my characters current speed and it isn't super fast. the whole point of the fast arc jump is for it to be faster than running speed. Maybe i can add a separate set of platform behavior that is only active when the character is running, or something like that.

2. As far as I know, the default jump angle is 90 degrees, so I need to alter that angle. But there is no "Jump angle" action, maybe the "angle of gravity" action will come in useful here, i'll try it out and let you know what happens.
B
6
Posts: 25
Reputation: 300

Post » Tue Sep 10, 2013 4:54 pm

You can use platform.vectorx and platform.vectory to control the jump's x (distance) and y (height) directions.

Is that what you're looking for?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Sep 10, 2013 5:46 pm

Yeah, control the vectorY and vectorY while the animation is playing, (even per specific frame if you want). Don't think if it as angles, think of it as horizontal movement speed VS vertical movement speed.

You might also need to set the platform behavior to ignore player input durring the jump so the player can't interfere with the vectorX and VectorY.

Best of luck,
Mike
B
49
S
9
G
4
Posts: 426
Reputation: 7,041

Post » Wed Sep 11, 2013 12:34 am

Ill give the vector idea a shot, thanks guys!
B
6
Posts: 25
Reputation: 300

Post » Wed Sep 11, 2013 5:08 pm

@Brashmonkey
@LittleStain

K I tried to make the vectors work, but I must be missing something on how vector values operate because altering the vector Y from 5000 to -5000 value didn't seem to do much and altering the vector x value just nudges me to the right slightly, even if I jump to the left I still get nudged to the right.

So I tried something else, I altered the max speed and acceleration for running jumps, and made sure that those values get reseted every time I land. The result is something close to what I was aiming for, but not the predetermined arc jump I originally aiming for. Since you two seem to know how vectors work, I'm gonna leave my most recent capx in this post, and if you have a moment, please alter it so I know how to properly use the vector x and y actions.

https://www.dropbox.com/s/tjlomdhiujdvm6u/Jumpingproblemspersist.capxCDAfree2013-09-11 17:20:26
B
6
Posts: 25
Reputation: 300


Return to How do I....?

Who is online

Users browsing this forum: DharmaOne, namaewayukidesu, Yahoo [Bot] and 15 guests