This article's documentation is for anything that uses the Source engine. Click here for more information.

ai_changetarget

From Valve Developer Community
Jump to navigation Jump to search
Info.png
This entity is not in the Counter-Strike: SourceDay of Defeat: SourceTeam Fortress 2Left 4 DeadLeft 4 Dead 2Counter-Strike: Global Offensive FGD by default.
See below for instructions on making it available.
Class hierarchy
CAI_ChangeTarget
CBaseEntity
triggers.cpp

ai_changetarget is a point entity available in all Source Source games. It's main use is for changing the target keyvalue of NPCs, but it can change the target of any entity if applicable. This task can also be done using AddOutput.

Keyvalues

Name (targetname) <string>
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Target (target) <targetname>
Entity(s) that should have target changed.
NewTarget (m_iszNewTarget) <targetname>
New targetname for the targeted entity(s) to target.

Inputs

Activate
Trigger the target change.