Skip to main content

calc_velocity_path

calc_velocity_path icon
Point entityPorted from FeaturefulSpirit of Half-Life

A calc_velocity_path works out the vector from a start position to a destination and hands it to the entity that asks for it. It can change the vector's length and cut it short where something blocks the line.

Triggering it does nothing. Instead, you put its name in a key that takes a vector, marked [LV] in the editor, and each time that key needs a vector, the calc_velocity_path works it out again at that moment. See the Locus guide for more details and some setups.

Attributes​

KeyDescriptionDefault
Nametargetname

Sets the name you put in another entity's vector key so it reads this one. See Common keys.

Start positiontarget

Sets where the vector starts, a locus position, so it can be a point such as 0 0 64, the name of an entity or of a calc_position. With *locus or !activator, it is the position of the entity that started the chain of triggers.

If you leave this key empty, it works like *locus.

Default *locus
Destinationnetname

Sets where the vector goes, and Destination is sets how it is read.

If you leave this key empty, the entity gives no vector.

Destination isarmorvalue

Sets how Destination is read.

  • Position (0) - As a locus position, so the result is the vector from Start position to that point
  • Offset (1) - As a locus vector, which is the result itself, measured from Start position
Default Position (0)
Length calculationhealth

Changes the length of the vector before Length factor multiplies it, and the direction stays the same. In the list, X is the length.

  • None (0) - The length stays as it is
  • Normalize (1) - The vector is 1 unit long
  • Reciprocal (2) - The length becomes 1 divided by the length
  • Inverse square (3) - The length becomes 1 divided by the square of the length
  • Square (4) - The length becomes the square of the length
Default None (0)
Length factornoise

Multiplies the vector by a locus number.

If you leave this key empty, the factor is 1.

Line is blocked byfrags

Cuts the vector short where a line from Start position along it first hits something, so the result ends at that point.

  • Nothing (0) - Nothing cuts the vector short
  • Walls (1) - Walls cut it short, but the line passes through glass and monsters
  • Walls & glass (2) - Walls and glass cut it short
  • Walls & monsters (3) - Walls, monsters and players cut it short
  • Walls, monsters & glass (4) - Walls, glass, monsters and players cut it short
Default Nothing (0)

Notes​

  • If the start and the destination are at the same point, the result is 0 0 0, and Length calculation leaves it at that
  • If a position it needs gives no value, the calc_velocity_path gives no vector, so the entity that asked does nothing that time
  • Maps made with Spirit of Half-Life 1.8 may call this entity calc_vecfrompos, and SBO accepts that name too

See also​

Changes since 1.38​

  • calc_velocity_path is new in SBO 2.0.0