(Solved) Continuous Jumping with Platform Behavior

Get help using Construct 2

Post » Sat Sep 10, 2016 11:40 pm

Trying to create a floating "joystick" that when in the up position makes the player jump continuously.
It's also going to control the player's left and right movement.

Image

The YP and XP vars are from the joystick. The joystick triggers: left, right, jumping or falling-through actions.

The problems I can't solve:

1. Having the sprite remain mirrored after the joystick is released in the right position
The mirror state it stays in after letting go of the joystick depends on which event is placed first in the event sheet.

2. Continuously jumping while holding up.
When the joystick is up it seems to hold the simulated jump button, and while it's held, the "on lands" event doesn't fire to make the character jump again. I've tried using variables, functions, and a slew of different logical ladders to try and make it work... No luck though.


If I can't get the platform behavior to do what I'd like, I will consider using a more manual way of controlling the character. Functions maybe?


Thank you in advance. :D
Last edited by dfernfield on Mon Sep 12, 2016 10:07 pm, edited 1 time in total.
B
18
S
8
G
5
Posts: 14
Reputation: 3,830

Post » Sat Sep 10, 2016 11:51 pm

There is an infinite jumper example that comes with C2, that might help you out.

Alternatively, post a CAPX and I'll take a look
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Sun Sep 11, 2016 11:08 am

when the joystick is released, XP = 0, so it is both inferior to 15 and superior to -15, so the lowest event runs.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Mon Sep 12, 2016 10:05 pm

Aphrodite wrote:when the joystick is released, XP = 0, so it is both inferior to 15 and superior to -15, so the lowest event runs.


Thank you! That fixed the mirroring problem. :D

This is what I changed it to for the player sprite mirroring to work, for anyone that's curious:

Image


As for the continuous jumping, I used the "trigger once" system event to produce this:
Thank you @andreyin for answering this in an unrelated question I had here: viewtopic.php?f=146&t=181660

Image
B
18
S
8
G
5
Posts: 14
Reputation: 3,830


Return to How do I....?

Who is online

Users browsing this forum: marc254 and 10 guests