12-Jul-2023
Copies the position and orientation of one entity to another, providing several additional options for angles and relative rotation. Entities moved with this won't shove away any objects blocking them, but pass through them, blocking said objects instead. (This entity does set the origin, it does not perform movement of an entity) This entity has several inconsistencies in its design. Most of the time you are better off assembling the operation you require using a few trigger_copyvalue.
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_setorigin so other entities can trigger it to set origin (or start constant origin copier with "Constant" flag checked). With "Constant" flag enabled the behaviour is based on trigger use-type: 'On','Toggle'- start constant origin set, 'Off'- stop constant origin set. With "Constant" flag disabled only 'On' and 'Toggle' use-types are accepted which sets origin once. Can be kill-targeted and constantly positioned entities are dropped.
Target target : Name of the entity to attach to or move to the copy-pointer entity.
Copy Pointer copypointer : The entity to copy coordinates/angles from.
Position Offset (X Y Z) offset : Offset the target entity by this vector when "Offset Difference" is set.
Angle Offset (X Y Z) angleoffset : Offsets the target entity's angles by this value when trigger_setorigin is first activated. Will only touch angles set to be copied as per spawnflags.
Invert X Angle invert_x : Use inverted pitch for the target entity's orientation.
Invert Y Angle invert_y : Use inverted yaw for the target entity's orientation.
Invert Z Angle invert_z : Use inverted roll for the target entity's orientation.
1 : Constant : Always update the target's position and orientation.
4 : Set Once : Only update the target once and remove the trigger_setorigin from the game afterwards.
8 : Lock Offsets : Use the vector between the target and the copypointer plus the "Offset"-keyvalue as the offset vector.
16 : Copy X Angle : Copy the X angle of the copypointer.
32 : Copy Y Angle : Copy the Y angle of the copypointer.
64 : Copy Z Angle : Copy the Z angle of the copypointer.
128 : Copy X Axis : Copy the X axis of the copypointer.
256 : Copy Y Axis : Copy the Y axis of the copypointer.
512 : Copy Z Axis : Copy the Z axis of the copypointer.
1024 : Skip Initial Set : If set, the target entity will not be moved to the copypointer's origin before doing the offset difference calculation (set this unless you want the target entity stuck to the center of the copypointer).
If you are copying the origin/angles from or to a brush based entity, then that entity must have an origin brush attached to it. The center of that origin brush will be used as the origin of the entire brush entity.
When using "Constant" flag and the entity does not have a targetname, the entity will not automatically turn itself on. Use a trigger_auto.