How do I make something move from A to B instantly?

  • How do I get an object to be in one place and then another instantly, like it is teleporting. For example if I get too close to the object, make it disappear and reappear in a new (set) location. This is quite urgent so a quick response would be very much appreciated.

  • Depends how you want to make it.

    1. But you can either you is overlapping which will make you able to teleport the object as soon as they are overlapping each other.

    2. Use a distance check to see if the objects are within a certain range. Distance(Obj1.X, Obj1.Y, Obj2.X, Obj2_Y) will give you the distance between two object, you can then check if this is lower than a certain value and act on that.

    If you want to make it so it based on mouse you just switch one object with Mouse.X and Mouse.Y

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry not quite what I was looking for, but I didnt explain myself very well. I mean could I go, say, +600 to Y axis and make it go there instantly, rather than a set coordinate with an X and Y value.

  • Instantly?

    Object -> SetPosition(Self.X,Self.Y+600) ?

  • Sorry not quite what I was looking for, but I didnt explain myself very well. I mean could I go, say, +600 to Y axis and make it go there instantly, rather than a set coordinate with an X and Y value.

    Sorry not really sure what you mean? As Deathangel says you can just set the position and it will instantly go there as he have shown.

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