Page 1 of 1

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

Posted: Thu Jun 18, 2015 12:59 pm
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.

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

Posted: Thu Jun 18, 2015 1:09 pm
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

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

Posted: Thu Jun 18, 2015 1:14 pm
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.

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

Posted: Thu Jun 18, 2015 1:26 pm
Instantly?

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

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

Posted: Thu Jun 18, 2015 3:13 pm
Maxwell002 wrote: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.