Skip to main content

locus_variable

locus_variable icon
Point entityPorted from FeaturefulSpirit of Half-Life

A locus_variable records a position, a vector and a number each time you trigger it, and gives them back later to the keys that the editor marks with [LP] for a position, [LV] for a vector and [LR] for a number. It can also make a short-lived marker entity that holds the values instead of keeping them itself.

Attributes​

KeyDescriptionDefault
Nametargetname

The name you put in another entity's locus key so it reads the values, and triggering the entity by this name records them. See Common keys.

Position to recordm_iszPosition

Sets the position to record, a locus 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
Vector to recordm_iszVelocity

Sets the vector to record, a locus vector.

If you leave this key empty, it works like *locus, so it is the velocity of the entity that started the chain.

Default *locus
Number to recordm_iszRatio

Sets the number to record, a locus number.

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

Default *locus
Child's namem_iszTargetName

With a name, each trigger makes a new marker entity with this name, which holds the values.

If you leave this key empty, the values are stored in the locus_variable itself.

Fire on spawnm_iszFireOnSpawn

The entity fires this after each recording, and passes on the marker as the activator, or the locus_variable when it makes none.

Child removed afterm_fDuration

Sets how many seconds pass before the marker is removed, and with 0, it is removed on the next server frame, after Fire on spawn has fired.

Default 0
Reset at round startround_reset

Sets whether the entity goes back to its state of the map start at each new round of Co-op, Battle Royale and Bounty Killer, before the players spawn.

  • No (0) - The entity keeps its values
  • Yes (1) - The entity goes back to its values of the map start
Default No (0)

Notes​

  • Read as a position, the locus_variable or its marker gives the recorded position, read as a vector, the recorded vector, and read as a number, the recorded number
  • If one of the three values can't be worked out, the trigger records nothing, makes no marker and fires nothing
  • Each marker is an entity, and no marker is made when the map is within 64 entities of the limit

See also​

Changes since 1.38​

  • locus_variable is new in SBO 2.0.0