NPC.SetTarget
From GMod Wiki
Function | |
Syntax | NPC:SetTarget( Entity Target ) |
Description: | |
Sets the target for the NPC. Used for some engine schedules. | |
Returns: | nil |
In Object: | Npc |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=NPC.SetTarget]NPC.SetTarget [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Sets the NPC's target to a player. |
---|---|
Used on | |
Code | npc:SetTarget( player.GetByID(1) ) |
Output | The NPC's target is now the first player. |