NPC/GetTarget

From Garry's Mod
Jump to: navigation, search
 NPC:GetTarget( )

Description

Returns the NPC's current target set by NPC:SetTarget.

BUG

This returns nil if the NPC has no target. You should use IsValid (which accounts for nil and NULL) on the return to verify validity of the target.

Issue Tracker: #3132

Returns

Entity

Target entity
Personal tools
Navigation