I have a patrolling guard and I want to make him stop walking his waypoints when I talk to another NPC.
The following doesn't seem to do anything. The guard stops for a moment but after that he continues following his waypoints.
AssignCommand(oGuard, ClearAllActions())
I've tried also adding this:
AssignCommand(oGuard, ClearAllActions(TRUE));
SetLocalInt(oGuard, "DONTWALK", 1);
and in the Guard OnHeartbeat I added the DONTWALK check into the condition:
// If we have the 'constant' waypoints flag set, walk to the next
// waypoint.
else if ( GetWalkCondition(NW_WALK_FLAG_CONSTANT) && GetLocalInt(OBJECT_SELF, "DONTWALK") != 1 )
{
WalkWayPoints();
}
But it still doesn't make him stop.
Is there a good way to make an NPC stop walking his waypoints?