Garry's Mod Wiki
Example
Kill any npc that sets the first player as its enemy.
Output: Any npc that sets their enemy to Entity( 1 ) dies.
Example
Make every NPC that does not have an enemy (and preferably a D_HT relationship agains Players) start attacking a random Player. This code is copied from the gamemode My Base Defence:
Output: All NPCs on the SERVER will get their memory updated if they don't already have an enemy, and start moving to the last know position of the enemy and try to attack. This enemy will be a random Player. They will also try and shoot enemy cover.
This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.
Page content is automatically updated four times a day. Edits and history are not available.
Last Parsed: Loading...