Skip to main content

trigger_motion

trigger_motion icon
Point entityPorted from FeaturefulSpirit of Half-Life

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:

KeyDescriptionDefault
Target to affecttarget

Names the entity, as a name or !activator.

Positionm_iszPosition

Sets the new position as a locus position, or with "Add offset", a locus vector to add.

Meaning of Positionm_iPosMode

Sets whether Position moves the target there or adds it as an offset.

  • Set new position (0)
  • Add offset (1)
Default Set new position (0)
Anglesm_iszAngles

Sets the angles as a locus vector, or with "Rotate by (Y Z X)", as three numbers.

Meaning of Anglesm_iAngMode

Sets 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)
Default Set new angle (face a direction) (0)
Velocitym_iszVelocity

Sets the velocity as a locus vector, or with "Rotate velocity (Y Z X)", as three numbers.

Meaning of Velocitym_iVelMode

Sets 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)
Default Set new velocity (0)
AVelocitym_iszAVelocity

Sets 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.

Meaning of AVelocitym_iAVelMode

Sets 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)
Default Set new avelocity (Y Z X) (0)

Flags​

1Debug

With 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​

Changes since 1.38​

  • trigger_motion is new