dim3 Forum

Full Version: Bots refuse to follow nodes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok, I have been working on this for a couple of weeks now and It is angering me to the point where I am thinking of throwing my computer out the window. For some reason my bots (even JoeFoe) refuse to follow nodes on my map! I have mimicked EVERYTHING in Big Indoor Map (which my bots work fine in), 2 different nodes named Dest01 and Dest02 on opposite sides of the maps, connected by nameless nodes. Not only do my bots just stand still, I keep on getting an error  about "no node walk to resume from" in joeFoeResumeNodeWalk():
Code:
function joeFoeResumeNodeWalk(obj)
{
        // resume walking nodes from last node
        
    obj.forwardSpeed.walk=35;
    obj.model.animation.start('Walking');
    obj.motionVector.walkToNodeResume(); // THIS LINE GENERATES AN ERROR
    
        // start a timer for waiting to fire

    obj.event.startWaitRandom(50,90,JF_WAIT_ID_FIRE_START);
    
        // set a flag so damage knows what we are seeking
        
    seekingPlayer=false;
}

I have been running some diagnostic messages and it seems they do run joeFoeStartNodeWalk() perfectly fine, even though they do nothing. This is REALLY making me ripping my hair out and I don't understand why It doesn't work. I have made a few advancements in AI (hearing loud weapons, immediately following the player when they get attacked, can get squished, etc.) and yet I can't get them to walk a fricking path. If ANYONE has ANY IDEA why this might be happening PLEASE tell me.

P.S: What does User Value setting for a node do?
Have you tried rebuilding nodes?
Yup, doesn't work.
I just did some more testing and it seems I still get an erro about "no node walk to resume from" from my custom Wolf Bot in Big Indoor Map even though the NodeWalking code is literally copy-pasted from JoeFoe. However, certain wolfs are able to nodeWalk on that map, which is very strange even though no bots (wolf, joefoe or otherwise) work on my map.
I dint know if this is going to solve the problem but you could try it: place the bot right on top of one of your nodes.
(also make sure your nodes are all placed on the ground)
yes, that is how to do it.
this also happened to me.
ROMAULD YOU ARE THE FRICKING MAN!! Thank you!!! My bots now follow the nodes, but they still do some stragne stuff. For instance one bot will simply walk in a loop between two nodes forever whereas the other one if you lead him to far away from where he was originally node walking will just try to walk in a straight line to the next node that should have been in his list (and consequently tries to walk through walls, objects, etc). I'll try and script and improve the AI a bit more in this respect, if anyone has any ideas/wishlists/solutions, feel free to share.

Todo list:
-Implement nodeWalkToPlayer()
-Implement a function that checks if the bot is 'stuck'
-Edit resumeNodeWalk() so that if it is a certain distance away from the node it was originally walking to, it will walk from the nearest node to the old destination.
-Edit the damage function so that it will retreat if injured beyond a certain point.
-Figure out a way to identify when one bot has become 'stuck' because of contact with another bot (i.e: too many bots on one node, two bots are walking into each other) and then devise a method to become 'unstuck'
Reference URL's