Calculate the time to when an NPC's activity is finished
5 replies, posted
Recently, I have been working to make a wandering NPC, similar to metaconstruct's version. All I'm using for the NPC to wander is getting a predetermined local position of a model then converting that to the last position of the NPC, forcing said NPC's schedule to [B]SCHED_FORCE_GO[/B]. Which works perfectly however, I would like to have the NPC's angles face the entity and also play an animation. I was wondering if there was a hook, or possibly a way I could calculate how long until the NPC gets there based off distance and walk speed?
[U]I'm not home so I can't paste in any code snippets, however I will post a snippet when I get home tomorrow.[/U]
I don't think it is deterministic when you have any obstacles that the NPC have to walk around, I can only think of Nextbot, I never got anywhere with SNPCs.