Movement between 3 lanes?

0 favourites
  • 4 posts
From the Asset Store
Run and Jump in 3 Dimensions! Take your platformer to the next level!
  • Hiya,

    So I'm trying to make a car move between 3 lanes. One of the things I don't understand is why there is no 'move object to position' command, or is there?

    See, I want the car to maintain its angle (say 0 degrees). Then when pressed up, move to the lane 1. Move down, move to lane 2. If in lane 3, the player can go up or hit the dirt and crashes (movement stops when hitting a barrier, set frame to 1). When in lane 1, go up and crash or move down to lane 2.

    Now initially I wanted some retro effect that moves the object in 5 pixels steps, 90 pixels distance between each lane. So if you press up, the car would could go up in steps of 5 pixels, travelling 90 pixels to the top lane.

    Now I came across a bunch of things while doing this myself. I'm still a bit of a n00b. I searched the forums but couldn't find any answers.

    I fiddled with it myself but I guess I still need to learn a lot I guess as I got a lot of unexpected results. For example, with this code (which is probbaly crappy and improvised) if I pressed up or down it would always move down.

    Thanks for any replies.

    • R
  • Good afternoon.

    I believe you need to set the position of the object, you can do it in the lines of code ...

  • Hello,

    Well I'm trying to make the car move to the lane, rather than just teleport to it. Preferably in 5 px 'steps' as described in my original post.


  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Have you tried (by pressing the key (specify a key), the car object move to position (car.x + (n ipxels))).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)