Ai changetarget: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
 
		
	
| m (.) |  (-added class hierarchy, cleanup) | ||
| Line 1: | Line 1: | ||
| {{lang|Ai changetarget}} | {{lang|Ai changetarget}} | ||
| {{CD|CAI_ChangeTarget|file1=triggers.cpp}} | |||
| {{base point|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|AddOutput}}. | {{base point|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|AddOutput}}. | ||
| Line 5: | Line 6: | ||
| ==Keyvalues== | ==Keyvalues== | ||
| {{KV|Target  | {{KV|Target|intn=target|target_destination|Entity(s) that should have <code>target</code> changed.}} | ||
| {{KV|NewTarget  | {{KV|NewTarget|intn=m_iszNewTarget|target_destination|New <code>targetname</code> for the targeted entity(s) to target.}} | ||
| {{KV  | {{KV Targetname}} | ||
| ==Inputs== | ==Inputs== | ||
| {{IO|Activate|Trigger the target change.}} | {{IO|Activate|Trigger the target change.}} | ||
| [[Category:AI]] | [[Category:AI]] | ||
Revision as of 10:22, 8 November 2022

 
|  Class hierarchy | 
|---|
| CAI_ChangeTarget | 
|  triggers.cpp | 
Template:Base point 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
- Target (target) <targetname>
- Entity(s) that should have targetchanged.
- NewTarget (m_iszNewTarget) <targetname>
- New targetnamefor the targeted entity(s) to target.
- 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
Inputs
- Activate
- Trigger the target change.























