Jump & Double Jump for Touch Controls [Resolved]

Get help using Construct 2

Post » Thu Aug 08, 2013 1:09 am

Here's a Capx I put together that combines Jump & Double Jump into one mechanic.

I found the solutions to both jump types on the forum so I put them together. I could not find a dual jump system for touch controls so I thought I'll post it.

:D
B
15
S
6
G
3
Posts: 87
Reputation: 4,304

Post » Thu Oct 10, 2013 10:55 am

thank you sir! any suggestions on limiting the amount of jumps he can perform one after another?
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Thu Oct 10, 2013 12:25 pm

Woops I'll update the caps later today.I think I forgot to put in a global variable.

If You make a double jump global var that equals zero when you tap for the second time that would say the d-jump is on.

If you then equal the d-jump global variable to 1 (off) It will deactivate the d-jump.

After that you then have to reactivate it by putting a 'wait' event to delay the reactivation then turn the double jump global var to zero.

Zero means On.
One means off.
You have to associate the global var that equals zero to the event that doubles jump.

:-) NECROKRIEG2013-10-10 12:29:40
B
15
S
6
G
3
Posts: 87
Reputation: 4,304

Post » Thu Oct 10, 2013 2:12 pm

i think i got it but one question.what if the player falls from very high?then the timer will reset and he will be able to rejump again.i am very new to this but wouldn't be better if we said doublejump=2 and each jump detract 1 from doublejump and when we reach zero deactivate? or something like that.
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Thu Oct 10, 2013 3:44 pm

Yo! Iv updated it so the player doesn't jump forever out of the layout (Same link) Do try out your theory to see if it works to exercise your problem solving and logic.

Mess around with the variables to achieve different double jump heights!NECROKRIEG2013-10-10 15:45:53
B
15
S
6
G
3
Posts: 87
Reputation: 4,304


Return to How do I....?

Who is online

Users browsing this forum: Kenthria, Maako, NN81 and 11 guests