Yay I found out what was wrong

. It turned out to be a bug in the action_go_to_routed thread (:oops:), which ended too soon and made the bot think he was at his destination.
Here I'll try to explain in a bit more detail. This is the basic route move code (simplified):
Code: Select all
while(isAlive self && self.task == local.task && local.nearestid > 0)
{
local.nearestid = self waitthread getnearestid local.route
local.id = local.nearestid - 1
local.node = level.route[local.route][local.id]
self thread action_go_to local.node 128 1
local.move_thread = parm.previousthread
local.newnearestid = local.nearestid
while(local.move_thread && local.newnearestid == local.nearestid)
{
waitframe
if(isAlive self)
local.newnearestid = self waitthread getnearestid local.route
else
break
}
if(local.move_thread)
local.move_thread.terminate = 1 // terminates the move thread
}
Basically the script finds the route node nearest to the bot and makes the bot go to the route node with id -1, so if node #5 is nearest the bot goes to node #4.
Now with bots v1.1 I introduced a new feature: the bot checks for route nodes all the time, to see if he can shorten his route (this turned out to be more or less necessary for the lakeside map). When he notices a nearer route node, he will go to that one and abort his current move. Now the problem is, when he aborts his move the bot script
assumes he has reached his destination. This is not a problem under most circumstances (that's why it wasn't noticed before

), but if the bot is going to the last node this assumption can make him exit the while loop too early. Thus the task_trigger.scr thinks the bot has completed his move and triggers the documents trigger.
This little error however has now been fixed effectively by only allowing bots to skip nodes if these nodes have a
lower id than the current id. Since the destination has an id of 0 this will prevent the appearance (:?) of 'ghost' bots
After all all I had to do was change this line
while(local.move_thread && local.newnearestid == local.nearestid)
into
while(local.move_thread && local.newnearestid >= local.nearestid)
but try to think of it
I'll give you a download link shortly, just have to think of the best way to distribute this minor update.
Oh sorry about the length of this post. It was not my intention to bore you
