NPC.SetEnemy
From GMod Wiki
Function | |
Syntax | NPC:SetEnemy( Entity Enemy[, Boolean ???] ) |
Description: | |
Tells an NPC to attack an enemy | |
Returns: | nil |
In Object: | Npc |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=NPC.SetEnemy]NPC.SetEnemy [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Additional Notes
- This will only work if it's being used on something it has a hate relationship too. It will not attack an ally.
- In my example, self.NPC was already set up. It was an object grabbed through another function.