Move to position, then stop

The title says it all. I simply want to make one object move to a location then stop.

Here is my setup

Sensor | Controller | Actuators

message | python script | TrackTo, Motion (Also tried steering, steering vibrates the object when the location has been reached)

I get the location to head to from the message and I simply want the player object to head to that location and stop when it has reached it. In the python script I activate both the TrackTo & motion actuators after updating their settings (TrackTo.object, etc).
Everything works great till the location is reached and the cube then just spins forever. Clearly, I need to add way to deactivate the motion & TrackTo actuators, but I’m fairly new to the engine and I’m not sure what would be the best way to do this.

I have some ideas like sending another message from the location to the entering object ,but that might be troublesome down the line. It would be best if the player object knew when the location has been reached and stops moving.

Anybody have any ideas? :o

In your script, you have three options:

(considering if you want to use the steering again)

  1. stop the steering actuator,
  2. make the steering target = None, or
  3. make the (I think) velocity 0 at a certain distance away from the target’s position.

A)
evaluate the distance to the target (Near sensor/Collision sensor/Python etc.)
Stop when the distance is below the step size (distance the object moves within one frame)
Optional: to ensure to stay at the exact position place the object at the target position after stopping

B)
Use the steering actuator.
Set the steering actuator to self terminating.
Use an actuator sensor to evaluate the deactivation of the steering actuator.