How do I move an object to a x,y position?

0 favourites
  • 15 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hi

    How can I move an object to a position (it would be better to set moving speed)?

    I found rexmove plugin but I think it was too old and construct2 showed me error.

  • It depends on what type of movement you want. You can either use the bullet behavior or the custom movement behavior.

  • Or if you simply wanna move something to somewhere over time, use lerp.

  • Pathfinding for a Platformer maybe?

    Or do you mean a dash or something like that?

    With this little information nobody can really help you with your problem..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • pathfinding, platformer, bullet, custom behavior, lerp or move to plugin... or maybe set position put more details in to your problem. More power!!!!

  • It depends on what type of movement you want. You can either use the bullet behavior or the custom movement behavior.

    I'm developing card game and I want to move a card for example from left side of table to the right.

    I want to set speed+position and card move to that position.

  • pathfinding, platformer, bullet, custom behavior, lerp or move to plugin... or maybe set position put more details in to your problem. More power!!!!

    I'm developing card game and I want to move a card for example from left side of table to the right.

    I want to set speed+position and card move to that position.

  • Pathfinding for a Platformer maybe?

    Or do you mean a dash or something like that?

    With this little information nobody can really help you with your problem..

    sorry for incomplete information

    I'm developing card game and I want to move a card for example from left side of table to the right.

    I want to set speed+position and card move to that position.

  • Thank you my friends, I am new to construct2. it was my mistake, I copied rex_moveto to plugin folder instead of behaviors folder

  • I don't know if it's possible with cards also, but couldn't you make a pathfinding behavior and when you click on the card, it will find the path to an object of the left side? You could set the speed a bit higher to make it be smoother.

    I'll try it.

  • I tried something out, maybe this is what you are searching for. There are some more tiny things also, but you don't need to use everything there, I also noted what you need and what not.

    dropbox.com/s/b6roeljscbf1qg2/CardGame_example.capx

  • pikazho

    Making an object move in a simple linear way from A to B and make it stop at B is something that you can't do in Construct 2 out of the box unless you use the unsuited, complicated methods that people have suggested you before, like pathfinding ??? what ?

    it still boggles my mind how can a basic and fundamental function is not an official behavior.

    Yes you can achieve it using lerp but if I'm gonna spend time to write a few low-level events everytime I want to simply move an object I might as well learn coding and use a non beginner-friendly engine.

    Anyway, you can use an unofficial behavior called Litetween.

  • abdellah

    Actually watch my capx...

    I did it with pathfinding and that's actually petty pretty simple (2 conditions needed)

    A new behavior wouldn't be needed really since pathfinding does the same.

  • 13spongg13 Yeah, sure, that's possible.

    But it would take up waaaaay more CPU power.

    Imagine if you want to move like 50 cards for example.

    Pathfinding would have to find a path for each and every single card while lerp for example just has to calculate once for every card.

  • randomly

    Yeah it may be, but as I said it's just one way to do it. I had only in mind to move 1 card at once (e.g. if you activate it)

    + I never really used lerp yet.

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