Game Development Community

OnReachDestination

by Howard Dortch · in Torque Game Engine · 12/06/2007 (11:29 am) · 1 replies

I have a bot I give a command %bot.setMoveDestination(%pos);
When the bot reaches the location it throws a callback, aiplayer::onReachDestination(%this,%obj);
Now the bot has reached the location I wanted, the callback is constantly called over and over. How can I clear this callback?
I want the bot to move to a new location but before it can move the onReachDestination is called again and messes up my pathing.

#1
12/07/2007 (6:28 am)
Call stopMove() on your bot. This should clear the destination point.

You should be able to just set a new destination though but it depends on how you are doing this.