How do I Move Object toward position and stop

0 favourites
  • 4 posts
From the Asset Store
This is a code so you can see the same skin on all screens (peers). Each peer gets a skin, in addition to 4 directions t
  • Hello Construct lovers!

    I'm practicing my skills in Construct to make my game idea come true, and I stucked with custom short movement. I want to make a bunch of objects move toward right, when the last one is shot away (similar to timberman but in horizontal perspetive). I tried to use bullet behaviour but i couldn't stop it when it moves its length/width. I tried custom movement but also i couldn't make it stop when it moves 24 pixels (its width).

    I was thinking about make it move and then afer system.wait(x-seconds) stops the movement but won't be pixel perfect and it's not the right way to this i guess.

    Generally I want to move it for time of 0.5 second or move 48 pixel per second and stops when it travels its width. Any ideas how to make it properly?

    I've made some prototype - but in this example blocks are moved in instant 24 pixel to the right, so no fluent movment is visible.

    Thanks in advance

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The MoveTo behaviour might do what you want.

  • The way you have set it up I would suggest using the MoveTo- plugin, you can find it in the plugin section (I believe it is the most used plugin for Construct2)

    Another way would be to use lerp (linear interpolation) or indeed the bullet behaviour (There's a moveto example shipped with C2 using bullet behaviour)

  • Wow, Thanks for such fast and accurate replay! That's exactly what i was looking for. It solves many of my issues i had on my mind

    Thanks and Regards!

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