12-Jul-2023
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.
Keyvalues |
OnDestroy Function ondestroyfn : Name of the function to use from already parsed .as script files when entity is destroyed (killed) in any way. If the function belongs to namespace, you must use prefix with the namespace name (e.g. mynamespace::MyFunction) for the keyvalue.
Name targetname : Set name of trigger_changetarget so other entities can trigger it to apply target change. Every trigger use-type works uniformly. Can be kill-targeted.
Target target : Entity which "Target" value will be changed.
Delay Before Trigger delay : Delay before trigger entity specified in "Target".
Kill Target killtarget : Non-functional in trigger_changetarget.
New Target m_iszNewTarget : New "Target" value for targeted entity.
This entity only changes one entity’s target, likely the first entity that it can find, instead of applying the change to all entity instances whose name matches the target. trigger_changevalue can be used to get around this.