Provides options for performing operations on an entity's keyvalue in relation to another keyvalue of another entity. This is a beefier version of trigger_changevalue
. Supports custom keyvalues
- 1: "Don't use X": Do not set X value of a vector. (E.g. pitch in angles)
- 2: "Don't use Y": Do not set Y value of a vector. (E.g. yaw in angles)
- 4: "Don't use Z": Do not set Z value of a vector. (E.g. roll in angles)
- 8: "Constant": Makes trigger_copyvalue toggleable, and perform the specified operation on the destination keyvalue on every update interval (See "Copy-interval (seconds)" below) while it is activated.
- 16: "Start On": Causes this entity to be enabled from level load onwards; this only makes sense in combination with "Constant".
- 32: "Invert target value": Causes the destination value to be negated before the operation.
- 64: "Invert source value": Causes the negated value of the source value to be used for the operation. The actual source value remains unchanged.
- 128: "Multiple destinations": Causes trigger_copyvalue to affect all destination entities instead of only the first one found.
- "Source entity", netname :
- Name of an entity to provide a source keyvalue for the operation.
- "Source key", m_iszSrcValueName :
- Name of the source entity's keyvalue - the keyvalue which shall play the later part in the operation.
- "Destination entity", target :
- Name of the one entity to have a keyvalue altered.
- "Destination key", m_iszDstValueName :
- Name of the keyvalue to be written on the destination entity.
- "Operation", m_iszValueType :
- This specifies how destination keyvalue and source keyvalue correlate. What exactly happens also depends on the types of the two. Some of the operations are explained over at trigger_changevalue's page.
- "Float-to-string/-int conversion", m_iFloatConversion :
- Specify how floats should be written to strings or converted into integers.
- "Trigonometric funcs. I/O", m_trigonometricBehaviour :
- When using trigonometric or arc-functions, use this to specify what measure you are using as input, or which measure you expect as output (when using arc-functions).
- "Append spaces (for strings)", m_iAppendSpaces :
- When the destination keyvalue is a string and you are setting it or appending to it, this specifies how many spaces to append to the end of the new string. This was implemented because Valve Hammer Editor cuts trailing spaces in keyvalues.
- "Trigger after operation", message :
- Specify an entity or entities to be triggered after the operation. This is very useful when you require a logic chain of operations to achieve a specific effect, e.g. assemble a message for a game_text entity to print. This will also be triggered for every interval in constant mode, when set.
- "Copy-interval (seconds)", dmg :
- When using constant mode, use this to specify the delay between intervals where the trigger_copyvalue performs its operation, in seconds. This defaults to 0.0 seconds, meaning once every server frame.
- When source keyvalue type is a vector and destination keyvalue type is a float or integer, the length of the vector will be used for operation. Any vector-extents excluded with spawnflags will not contribute to the length. If only one vector-extent is used, it will be transmitted directly, meaning the orignal value, not the length/absolute value of it.
- The spawnflags to exclude vector-dimensions affect source and destination keyvalue. When you set the value of a float or integer to a vector, only those vector-extents not excluded will be set to the value of the float/integer.
- "Direction to Angles" and "Angles to Direction" are useful if you want to move something in the direction it's facing or force players to look in the direction of a train they are on. It's also very useful when you want to glue one entity to another and have it rotate around it. Direction vector is outputted normalized, meaning with a total length of exactly 1 unit.
- You cannot copy the model from one brush entity to another brush entity, because additional actions are required for that to work. Use trigger_changemodel for that instead.
- Writing to strings currently does continuously eat away at server memory because of how Valve did string-"management" in the Goldsource-engine; that means strings you have set remain in server memory unless it restarts, eventually causing memory to be full and the server to shut down. While this is rather obsolete (strings don't need much memory), try not to write them THAT often, e.g. not every server frame when in constant mode, but only every 0.3 seconds, at least when you assemble larger strings.