NPC.SetTarget
From GMod Wiki
Revision as of 18:07, 1 June 2011 by Chrisaster (Talk | contribs)
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. |