Difference between revisions of "Trigger changetarget"

From Sven Co-op
Jump to navigation Jump to search
(Import of converted entguide pages from Sven Manor.)
 
(Add note regarding behaviour with multiple entities sharing the same name)
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
}}
 
}}
  
The proper method for changing the target-keyvalue of an entity. You should prefer this to using a trigger_changevalue, if you can, because this entity takes several special cases into account.
+
This entity changes the target keyvalue of an entity. You should generally prefer this to using a trigger_changevalue, if you can, because this entity takes several special cases into account. Be aware however that this entity only work correctly with entities that have a unique name, see note for more details.
  
 
== Keyvalues ==
 
== Keyvalues ==
  
{{Entity_keyvalue|Target|target|Entity to change it's target.}}
+
{{Entity_keyvalue|Target|target|Entity whose target will be changed.}}
 
{{Entity_keyvalue|New Target|m_iszNewTarget|New "Target" value for targeted entity.}}
 
{{Entity_keyvalue|New Target|m_iszNewTarget|New "Target" value for targeted entity.}}
 +
 +
== Notes ==
 +
 +
This entity can only update one entity’s target. If multiple entities share the same name, and that name is specified as the trigger_changetarget’s target, only one of those entities will have its target updated.
  
 
{{entity_title}}
 
{{entity_title}}

Latest revision as of 23:00, 23 May 2023

trigger_changetarget
Type

point

Status

supported

 


This entity changes the target keyvalue of an entity. You should generally prefer this to using a trigger_changevalue, if you can, because this entity takes several special cases into account. Be aware however that this entity only work correctly with entities that have a unique name, see note for more details.

1 Keyvalues

Target : target

Entity whose target will be changed.

New Target : m_iszNewTarget

New "Target" value for targeted entity.

2 Notes

This entity can only update one entity’s target. If multiple entities share the same name, and that name is specified as the trigger_changetarget’s target, only one of those entities will have its target updated.