How do I make a touchpad for a platformer?

Get help using Construct 2

Post » Fri May 20, 2016 3:40 am

left and right movement?

I followed this guide as a experiment.

https://www.scirra.com/tutorials/1075/m ... y-touchpad

I tried to make this instead so it will still be a touchpad (joystick--), as I don't want buttons.

So this is what I thought it would look like but it does not work for me at all, what am I doing wrong?

Image

I want it to be like "If the touchpad gets pressed on left side, then Hero move left"

Same with right side.


------------------------------

Also since I have this thread, I have a other question.

Is there a way to implent "movement floor", I actually don't know the word for it.

Its where the floor moves to right side so this happens.

    If you stand still -> Your character moves to the right
    You move to right -> You get boosted movement speed
    You move to left (against the floor) -> You get lowered movement speed
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Fri May 20, 2016 8:58 pm

I am currently bumping my post, thank you
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Fri May 20, 2016 10:27 pm

are you using different layers with parallax less than 100?
if so, you need to especify which layer you are touching when comparing touch. You do that by adding ("layername") to the touch coordinate. E.g. --> Touch.X("Layer1")


For your other question:
Every tick --> Simulate pressing right

When you stand still --> set player max speed = whatever speed you want
When you move right + trigger once while true --> set player max speed = Player.8Direction.Speed * 1.2
When you move left + trigger once while true --> set player max speed = Player.8Direction.Speed * 0.8

You cant change the multipliers to get higher speed variations
B
22
S
4
G
3
Posts: 61
Reputation: 2,683

Post » Sat May 21, 2016 7:32 am

Tuiii wrote:are you using different layers with parallax less than 100?
if so, you need to especify which layer you are touching when comparing touch. You do that by adding ("layername") to the touch coordinate. E.g. --> Touch.X("Layer1")


For your other question:
Every tick --> Simulate pressing right

When you stand still --> set player max speed = whatever speed you want
When you move right + trigger once while true --> set player max speed = Player.8Direction.Speed * 1.2
When you move left + trigger once while true --> set player max speed = Player.8Direction.Speed * 0.8

You cant change the multipliers to get higher speed variations


Skipping the movement plates for now but got the touchpad to work! :D
B
21
S
9
G
8
Posts: 188
Reputation: 6,069


Return to How do I....?

Who is online

Users browsing this forum: imothep85, newt, Yahoo [Bot] and 10 guests