Skip to main content

calc_vecfromnums

calc_vecfromnums icon
Point entityPorted from Featureful

A calc_vecfromnums makes a vector out of three numbers, or takes a vector and replaces some of its parts with numbers, and hands the result to the entity that asks for it. A key that takes a position reads the same three numbers as a point on the map.

Triggering it does nothing. Instead, you put its name in a key that takes a vector or a position, marked [LV] or [LP] in the editor, and each time that key needs one, the calc_vecfromnums 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 or position key so it reads this one. See Common keys.

Base vectorbase_vector

Sets the vector to start from, and Base vector is sets how it is read. You can use three numbers such as 0 0 100, or the name of an entity. With *locus or !activator, it uses the entity that started the chain of triggers.

If you leave this key empty, the vector starts as 0 0 0.

Base vector isvector_type

Sets how Base vector is read.

  • Velocity (0) - As a locus vector, so an entity name gives that entity's velocity
  • Position (1) - As a locus position, so an entity name gives that entity's position
  • Color (2) - As a color, so an entity name gives that entity's FX Color
Default Velocity (0)
X valuex_value

Replaces the X part of the vector with a locus number.

If you leave this key empty, the X part of Base vector stays.

Y valuey_value

Replaces the Y part of the vector with a locus number.

If you leave this key empty, the Y part of Base vector stays.

Z valuez_value

Replaces the Z part of the vector with a locus number.

If you leave this key empty, the Z part of Base vector stays.

Notes​

  • If Base vector or one of the numbers gives no value, the calc_vecfromnums gives no vector, so the entity that asked does nothing that time

See also​

Changes since 1.38​

  • calc_vecfromnums is new in SBO 2.0.0