Garry's Mod Wiki

Garry's Mod Wiki

  NPC:TargetOrder( Entity target )

Description

Cancels NPC:MoveOrder basically.

Only works on Citizens (npc_citizen) and is a part of the Half-Life 2 squad system.

The NPC must be in the player's squad for this to work.

Arguments

1 Entity target
Must be a player, does nothing otherwise.

Example

A console command that once used cancels Move Orders and makes the NPCs return to the player.

concommand.Add( "targetnpcs", function( ply ) for id, npc in ipairs( ents.FindByClass( "npc_citizen" ) ) do npc:TargetOrder( ply ) end end )

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...