route errors

Please use this forum to ask all your MoHAA Bots questions / discussions

Moderator: Moderators

Post Reply
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

route errors

Post by Krane »

I'm using the method of:

level.routlist [routes_to_bomb] [1] = "north"
level.routlist [routes_to_bomb] [2] = "east"
etc...

instead of:

level.routelist [routes_to_bomb] = "north"::"east"

Any problem? I don't think so...

Anyway...I was having some errors like"...ERROR:actor can't find path or something...couldn't find end node or unreacheable path..."

Ok, I know what that means. So I comment the second line to check if is this line the d*** line..... like:

//level.routlist [routes_to_bomb] [2] = "east"

Any problem? Am I "nulling" this route? Looks like the bots are not using this route anymore...cool. But I still got the error!

So I commented ALL the lines and...still some unreacheable path!!!?!??!?

wtf?

PS: Another thing:

The [1] in the level routelist is the priority number?

Thanks.
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Well I need to clear up some haze here I think :)

"...ERROR:actor can't find path or something...couldn't find end node or unreacheable path..."

This error is not generated by the bot scripts but by the in-game pathfinding system. It means that a bot failed to calculate a route to its destination. This means the destination is unreachable from the current position of the bot. It may be caused by 'one-way' routes or possibly unreachable pathnodes. See the bot manual for more details ;).
The [1] in the level routelist is the priority number?
Nope, it's simply a number identifying the element in the array. Without this number, for example:

level.routelist[routes_to_bomb] = "north"
level.routelist[routes_to_bomb] = "east"

The second line would overwrite the first one.

It is compulsory that all elements in the level.routelist[routes_to_bomb] array have such a number, which should be 1 for the first element up to n for the n-th element. No numbers can be skipped, or some routes won't work properly.

If you use the north::east syntaxis the game automatically assumes the enumeration, so in general this is a safer way. It may lead to awkwardly long lines though ;).
Image
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Re: route errors

Post by Krane »

Thanks for the reply, jv.

As you see I'm using the number identifying the element in the array.
Krane wrote:I'm using the method of:

level.routlist [routes_to_bomb] [1] = "north"
level.routlist [routes_to_bomb] [2] = "east"
etc...
Thinking more and more, I realize a thing: AREAPORTALS!!!!!!!!

Let me explain: If the end node (lowest #id) is INSIDE a room that is not being drawing, the bots will not find the end node. Is that correct?

I understand about the in-game pathfind. The errors are caused by the paths bots decide by themselfs, not by MY routes...And I saw a bot stopping exactly where the problem was. And it was not one of my routes. Was a route that the in-game pathfinding creates... And it points to a room that is sealed by areaportals, so I think that's why the bot cannot find the end node, or don't reach a node...

That would explain everything...

Agree?
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Nope, nice try but bots can navigate perfectly through areaportals :wink:

Just make sure there is a green line (route) through the door when it's opened.
Image
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post by Krane »

Well, that's good news...

So my problem is simple poor pathnodes design. Cool, I'll work on it!

Thanks m8!

btw: HOW FAR the pathnode #id 1 (closest to the destination) SHOULD BE from the bomb (destination)? Or perhaps the bots just "take from there" and keep going? I've fixed one of my routes but I'm afraid the #id1 node is too far (it really is) from the bomb. The bot reaches this node and stops! No errors!

UPDATE: The bots "take from there"! I made a route where the #id 1 node is far away from the destination and the bots took that route until the node #id 1. From there they went straight (the shortest way) to the destination.

hmmm...
Image
Post Reply