Move the player on a specific path

Hello Gdevelop community, i have some troubles with one thing in my game. I want to make the player move up and down on 3 different paths (the game is a 2d one so you can only move left and right, but with this feature you can change the position on the y axis to change the path, like subway surfers but horizontally). How do i do that? I only want to use 2 keys to do this (“w” and “s”) but i don’t know hot to do this on those 3 paths

Hi I3R0K3. I think we need some more info. Is this a platform game or a top-down? Are you using a behavior to more the objects or are you applying force? It’s tough for me to visualize your project. So, I can’t make any suggestions. A screenshot of your events or the scene would really help.

Sure, I’m using the platformer character behavior with custom keys, vut you can’t jump (only walk left and right), about the style is just a 2d game

To switch paths there would have to be some form of interaction either through touch, keyboard, collision or the players position. It depends if the player is choosing the path or the game is.

You could use a moving platform or elevator or a position tween from one position to another. You might need to temporarily disable the platform behavior while moving the character with a tween so it can pass through the platforms and the tween doesn’t conflict with the platform behavior.

I managed to do that by only pressing a key (“w” to go to the top path “s” to go to te bottom one). For now it works with 2 paths but i think it’s good.