Garry's Mod Wiki

NPC:SetTarget

  NPC:SetTarget( Entity entity )

Description

Sets the NPC's target. This is used in some engine schedules.

Arguments

1 Entity entity
The target of the NPC.

Example

Sets the NPC's target to first player.

npc:SetTarget( Entity( 1 ) )