:MoveTo() Timeout Changes

Yeah, so I was using :MoveTo() and my npc wasn’t reaching its goal. Was told that if it takes too long, it gets cancelled.

Pretty annoying. Can we like set the timeout or something?

If :MoveTo() uses path finding, for computation duration reasons it might cancel after some time or distance?

Why is there even a timeout in the first place :confused:

Probably for the case that if the NPC never reaches its goal it won’t loop forever.

Why shouldn’t it continually try to reach its target goal?

Using that approach, you get garbage loops which never reach their end.

I propose a simple addition to the MoveTo method; a reading function connected to the thread which returns a status string. You can then act accordingly.

A hipster solution would be to add exponentially decaying retries when the target cannot reach it’s goal. :stuck_out_tongue:

Using that approach, you get garbage loops which never reach their end.

I propose a simple addition to the MoveTo method; a reading function connected to the thread which returns a status string. You can then act accordingly.

A hipster solution would be to add exponentially decaying retries when the target cannot reach it’s goal. :P[/quote]

The MoveToFinished event passes a reached parameter. I learned of that after this thread post.

There’s nothing garbage about them. Hop into Minecraft, Skyrim, or Dragon Age and run around just outside of an enemy’s reach and see if they ever stop chasing you. They don’t. This kind of behavior prevents MoveTo from working properly, and is an annoying gotcha that you have to learn the hard way when your AIs stop pathfinding all of a sudden for no reason in your games over long distances.

You tell it to walk 1000 studs north and oops 30 seconds later it stops because it hasn’t reached its destination. If anything is garbage, it’s that automatic timeout. Sure you can manually re-initiate the movement every time it stops, but that’s unnecessary work that you shouldn’t have to do in the first place.

1 Like