should be simple

0 favourites
  • 11 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • Hi All,

    I've looked around at a lot of threads and I havent found a concrete answer to this question though in principal it should be immensely simple. I am just fiddling with construct 2 and don't have a game in mind yet.

    However I have an object and after a certain amount of collisions I want it to move to a specified x and y location on screen then stop there. Now i've tried set position although all it does is sortof 'teleport' there. I've also tried using custom movement where I could input the x and y coordinates but the object continued to fly off screen instead of stopping there. So I'm stumped.

    Can anyone give me the simplest method to achieve this? It doesn't sound like it should be complicated.

    All the best

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Simplest method? Install rexrainbow's MoveTo plugin.

    If you want to do it without any plugins (to upload to the Scirra arcade, for example), then you could still use your custom movement idea, but have an invisible sprite in position to "catch" the moving object. Then just set up an event something like: Player Is overlapping Catcher (System Trigger once) -> Player CustomMovement Stop

  • That sounds interesting. With the plugin method will that affect publishing to any other platforms too? Also I like the catch idea, will that be difficult if there are itens on the platform while its moving?

  • There aren't any issues with plugins that I know of, but I'm also fairly new here so might not be the best person to answer that.

    The catcher shouldn't interfere with anything else or prove to be difficult at all. It'll be set to invisible and won't have any other behaviours like solid or physics. It's really just target and a destination. But post a more specific issue if you come across one when you're working on it and we'll see what help can be offered.

  • Thank you very much

  • There seems to be a problem downloading the plugin. When I click on the link It opens in notepad. Is this normal?

  • And here, just because I wanted the opportunity to try this out myself: a capx

  • There seems to be a problem downloading the plugin. When I click on the link It opens in notepad. Is this normal?

    It looks like an error naming the file. rexrainbow

    You should rename it to rex_moveto.7z.

  • Got It, thank you so much for all this. Plugin works really well.

  • I have no idea what you are using to move the object around, but when you place it at its new coordinates you will need to disable those movements, so lets say you have bullet, physics, 8-direction, or platform behavior on the object. You need to make an event to disable these movements from within the object. If you have something like While D pressed -> Move Object X to Object.X+2 Just add a global variable called AllowedMove and ONLY allow the player to move when this is true. THEN, set it to 0 when the object is set to that position so the player can't move it around.

  • assign bullet to object.

    when you want it to move to said location

    event whatever:

    -> set bullet angle(or angle of motion) angle(bulletX/Y, targetXY)

    -> set bullet enabled

    then do whatever you want to disable the bullet upon reaching location

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