Ai changetarget: Difference between revisions
Jump to navigation
Jump to search
m (Updated old entity format to {{this is a}}. This action was perfomed by a bot under supervision.) |
(-nofgd) |
||
| Line 1: | Line 1: | ||
{{Ent not in fgd}} | |||
{{CD|CAI_ChangeTarget|file1=triggers.cpp}} | {{CD|CAI_ChangeTarget|file1=triggers.cpp}} | ||
{{this is a|e0|name=ai_changetarget}} It's main use is for changing the <code>target</code> keyvalue of NPCs, but it can change the target of any entity if applicable. This task can also be done using {{ent|mode=link|AddOutput}}. | {{this is a|e0|name=ai_changetarget}} It's main use is for changing the <code>target</code> keyvalue of NPCs, but it can change the target of any entity if applicable. This task can also be done using {{ent|mode=link|AddOutput}}. | ||
==Keyvalues== | ==Keyvalues== | ||
{{KV Targetname}} | |||
{{KV|Target|intn=target|target_destination|Entity(s) that should have <code>target</code> changed.}} | {{KV|Target|intn=target|target_destination|Entity(s) that should have <code>target</code> changed.}} | ||
{{KV|NewTarget|intn=m_iszNewTarget|target_destination|New <code>targetname</code> for the targeted entity(s) to target.}} | {{KV|NewTarget|intn=m_iszNewTarget|target_destination|New <code>targetname</code> for the targeted entity(s) to target.}} | ||
==Inputs== | ==Inputs== | ||
Revision as of 08:05, 18 February 2024
| CAI_ChangeTarget |
ai_changetarget is an e0 available in all
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>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentnameortarget).
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
targetchanged.
- NewTarget (m_iszNewTarget) <targetname>
- New
targetnamefor the targeted entity(s) to target.
Inputs
- Activate
- Trigger the target change.