Double Jump for Autorunner?

Get help using Construct 2

Post » Mon Jul 21, 2014 10:57 pm

I'm trying to include a Double Jump feature for my autorunner game but i can't get it to work. I've found a few posts online about Double Jump, albeit not for an autorunner, and i've tried to include what i've found into the autorunner template to see if it works but unfortunately it's not working for me.

Could someone help me out with this please? I've posted a capx file to show what i tried so far.

Thanks
You do not have the required permissions to view the files attached to this post.
B
5
S
2
Posts: 126
Reputation: 876

Post » Tue Jul 22, 2014 5:13 am

I changed your CAPX to have double jump functionality, please have a look at the attached file and ask me if something is unclear
You do not have the required permissions to view the files attached to this post.
B
30
S
4
G
3
Posts: 67
Reputation: 2,329

Post » Tue Jul 22, 2014 2:01 pm

Thank you so much, it works great :)
B
5
S
2
Posts: 126
Reputation: 876

Post » Wed Jul 30, 2014 8:02 pm

@refais23 Thanks again for your help, i've come across something i was hoping you can help with. The double jump works fine but I've noticed that if i just run off the platform and press the jump button, the player still jumps in mid air.

I would like it so the double jump only works after the player jumps rather than at anytime when the player is in mid air.

Can you help please?

Thanks.
B
5
S
2
Posts: 126
Reputation: 876

Post » Thu Jul 31, 2014 1:44 am

To add (or change) any functionality on your games, first you have to figure out exactly what do you want to change and then figure out a way to do it.
In this case, you need double jump to be active only if the character jumped, not if the character is falling (off a platform, for example). So all we need to do is add the condition:

Player platform is NOT falling [Add it to the double jump code].

I edited @refais23 capx with this change.
You do not have the required permissions to view the files attached to this post.
B
28
S
10
G
10
Posts: 97
Reputation: 6,584

Post » Thu Jul 31, 2014 1:57 pm

Thanks but its not working quite how i want it to. The player doesn't jump when falling off the platform (which is what i want) but now to do a double jump you have to press jump again straight after jumping, which isn't ideal. If i jump and want to do a double jump on the way down, it won't do it as the Not Falling code is added.

Would it be best if the double jump is only triggered when the player jumps? If so, how can i do this?
B
5
S
2
Posts: 126
Reputation: 876

Post » Fri Aug 01, 2014 4:37 am

Okay... this is one to do it:
Expected behavior: Double jump only after the player initially jumped (even after player starts to fall after a jump).

So, your main condition is that you can only start a jump while on the ground or after another jump up to one time.

Use the jump variable for this.

Modified @refais23 capx again.
You do not have the required permissions to view the files attached to this post.
B
28
S
10
G
10
Posts: 97
Reputation: 6,584

Post » Sat Aug 02, 2014 3:42 pm

Thanks :)
B
5
S
2
Posts: 126
Reputation: 876


Return to How do I....?

Who is online

Users browsing this forum: Cubeeo and 21 guests