I am typing from phone.
My ai does this
Public void updatedelegate() //changes ai script update method
Walks.move(targetpos);.
If(istarai.reachedEndOfPath && executing == true)
{
Executing = false;
}
Easy easy, except not because astar does not immediately start calculating a new path, (and i dont want it to). So adding && !iastarai.pathpending does not work, because it has not even started yet, and may not for another .5 seconds, ( the update cycle i have it set to)
I need something like this
If(iastarai.hasreachedendofpath && iastarai.hasnopathcalculationqueued)
{
Executing = false;
}
So my ai can know it can dump the command and move to the next command in the list. I have tried a counter, to delay the check on iastarai.hasreachedendofpath, and it works, but i have to delay by .75 seconds to “work”, (my aistarai updates every .5 seconds), plus that causes a delay in the ai executing pother commands.
Isnt there a way for astar to say, “ok, i got the command for a new new path destination”. ?