Ai changetarget: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(→‎Inputs: |prel4d=1)
(not hl2-only)
Line 1: Line 1:
{{lang|Ai changetarget}}
{{lang|Ai changetarget}}
{{hl2 point|ai_changetarget}} It's main use is for changing the <code>target</code> keyvalue of NPCs. It can be used for changing any entity however. The function can also be done using {{ent|AddOutput}}.
{{base point|ai_changetarget}} It's main use is for changing the <code>target</code> keyvalue of NPCs. It can be used for changing any entity however. The function can also be done using {{ent|AddOutput}}.


{{code class|CAI_ChangeTarget|triggers.cpp}}
{{code class|CAI_ChangeTarget|triggers.cpp}}
Line 7: Line 7:
{{KV|Target (target)|target_destination|Entity(s) that should have <code>target</code> changed.}}
{{KV|Target (target)|target_destination|Entity(s) that should have <code>target</code> changed.}}
{{KV|NewTarget (m_iszNewTarget)|target_destination|New <code>targetname</code> for the targeted entity(s) to target.}}
{{KV|NewTarget (m_iszNewTarget)|target_destination|New <code>targetname</code> for the targeted entity(s) to target.}}
{{KV BaseEntity|base=1}}
{{KV BaseEntity|base=1|css=1}}


==Inputs==
==Inputs==

Revision as of 15:51, 8 September 2018

English (en)Translate (Translate)

Template:Base point It's main use is for changing the target keyvalue of NPCs. It can be used for changing any entity however. The function can also be done using AddOutput.

C++ In code, it is represented by theCAI_ChangeTargetclass, defined in thetriggers.cppfile.

Keyvalues

Target (target) ([todo internal name (i)]) <targetname>
Entity(s) that should have target changed.
NewTarget (m_iszNewTarget) ([todo internal name (i)]) <targetname>
New targetname for the targeted entity(s) to target.


Inputs

Activate
Trigger the target change.


Outputs