Garry's Mod Wiki

NPC:NavSetGoalTarget

  boolean NPC:NavSetGoalTarget( Entity target, Vector offset = Vector( 0, 0, 0 ) )

Description

Set the goal target for an NPC.

This will call either NPC:TaskComplete or NPC:TaskFail for the current schedule and task, forcing the current task to progress to next task or fail.

Arguments

1 Entity target
The targeted entity to set the goal to.
2 Vector offset = Vector( 0, 0, 0 )
The offset to apply to the targeted entity's position.

Returns

1 boolean
Whether path generation was successful or not