Jumping and suggestion

Get help using Construct 2

Post » Sun Oct 21, 2012 8:45 pm

Hi.

I know there is a lot questions about it, and "how to". I couldn't find any detailed guide with pictures about it.

"vectorY < 0, set vectorY to vectorY / 2. "

it's not enough to understand how to do it actually... please for the last time someone could please put some instructions with pictures how to make a long\short jump by how long you are pressing on space for example?

Also for Scirra if all your tutorials will be more detailed even if the guide will have more then 20 pages people will be more likely to buy it.
Also it'll prevent the flood of question like mine.

Thank you.
B
18
S
4
G
2
Posts: 21
Reputation: 2,537

Post » Sun Oct 21, 2012 10:03 pm

People don't have time to make tutorials with pictures for every question that people have, unfortunately. You are going to have to work some elements out yourself.

You want to make a jump where the height jumped is dependent on how long you have been holding the key down.

This is done in two stages.

Stage 1: find out how long the player has been holding the button down.

Stage 2: Use that to determine how high the jump should be.

So that sounds easier now. To do stage 1, you need to use the System.time expression when the key is pressed - store it in a variable. When the key is released you can use the System.time expression again to get the new time, subtract the old time (which you stored in a variable) to get the length of time the key was held.

To do stage 2 depends on how you are doing a jump. Are you using the platform behaviour for example. Anyway - hopefully you will know how to make a jump. All you have to do is use set the value of the jump height using the value you obtained, probably with a multiplier, probably also clamped to sensible values.

Hope this helps.

B
11
S
4
G
3
Posts: 70
Reputation: 3,071

Post » Sun Oct 21, 2012 10:24 pm

I think what he's asking is how to do a Mario or Sonic style jump, where you stop ascending if you let go of the jump button.

Try this:

+Player is Jumping
+Jump Key is not down
--> Set Player.Platform.VectorY = Player.Platform.VectorY / 2

It doesn't necessarily have to be divided by 2 either. You can set it to whatever number feels good to you.
B
57
S
20
G
7
Posts: 305
Reputation: 8,779

Post » Mon Oct 22, 2012 9:02 am

[QUOTE=TL22] I think what he's asking is how to do a Mario or Sonic style jump, where you stop ascending if you let go of the jump button.

Try this:

+Player is Jumping
+Jump Key is not down
--> Set Player.Platform.VectorY = Player.Platform.VectorY / 2

It doesn't necessarily have to be divided by 2 either. You can set it to whatever number feels good to you.[/QUOTE]

Thank you,
But I didn't find how to set it "Set Player.Platform.VectorY = Player.Platform.VectorY / 2
" If you can explain to me how to do it it'll be great. I can see that I have the ability to add sub envent but coudln't find the right command for Player.Platform.VectorY.

Thanks.
B
18
S
4
G
2
Posts: 21
Reputation: 2,537


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 22 guests