trigger_motion

A trigger_motion sets or changes the position, angles, speed and spin of an entity once for each trigger, and a key
that you leave empty changes nothing.
Attributes
The entity also has these common keys:
- Naming and triggering: Name
targetNames the entity, as a name or !activator.
m_iszPositionSets the new position as a locus position, or with "Add offset", a locus vector to add.
m_iPosModeSets whether Position moves the target there or adds it as an offset.
- Set new position (0)
- Add offset (1)
Set new position (0)m_iszAnglesSets the angles as a locus vector, or with "Rotate by (Y Z X)", as three numbers.
m_iAngModeSets whether Angles turns the target to face a direction or turns it by angles.
- Set new angle (face a direction) (0)
- Rotate by a direction's angles (1)
- Rotate by (Y Z X) (2)
Set new angle (face a direction) (0)m_iszVelocitySets the velocity as a locus vector, or with "Rotate velocity (Y Z X)", as three numbers.
m_iVelModeSets whether Velocity sets the target's speed, adds to it or turns its current velocity.
- Set new velocity (0)
- Add to velocity (1)
- Rotate velocity by a direction's angles (2)
- Rotate velocity (Y Z X) (3)
Set new velocity (0)m_iszAVelocitySets the turning speed as three numbers in the order Y Z X. For a number written as a..b, the entity picks a random number between a and b.
m_iAVelModeSets whether AVelocity sets the target's turning speed or adds to it.
- Set new avelocity (Y Z X) (0)
- Add to avelocity (Y Z X) (1)
Set new avelocity (Y Z X) (0)Flags
1DebugWith developer 1 set in the console, the server console shows each change
Notes
- It only changes a player while they are alive. A player whose speed changes on the server sees a small correction on their screen
- It doesn't move the entities that move along with the target
- If the entity it moves has Move with, it goes to the new position or angles, and after that it keeps that place on its parent. A velocity is its own movement on top of its parent's movement
- On a solid child, the position modes move it in jumps, so the child doesn't carry players who stand on it. The velocity modes carry them. See Moving objects
See also
motion_manager- keeps changing them in every frame- Locus system - the positions and vectors these keys accept
Changes since 1.38
trigger_motionis new

