Es createvectorfrompoints

From EventScripts Community Encyclopedia


Overview

Syntax: es_createvectorfrompoints <outputvar> <vectorstring-A> <vectorstring-B>

Note: Command parameters are described inside the < and > characters. Optional parameters are contained within [ and ] characters.

Variation of this command that doesn't expand variables: es_xcreatevectorfrompoints

Description

Creates a vectorstring (stored in outputvar) that points from vector/point A to vector/point B.


Parameters

  • outputvar - the name of the variable where the actual vector will be stored.
  • vectorstring-A - the name of the variable which holds the position of point A.
  • vectorstring-B - the name of the variable which holds the position of point B.


Examples

 // This will initialize our variable
 es_xsetinfo vectorAB 0
 // This will create the vector string that points from A to B
 es_createvectorfrompoints vectorAB server_var(pointA) server_var(pointB)
 // This is what a vector string looks like
 "1032.02,-234.56,-86.34"


Notes

  • This is equivilant to doing Bx-Ax, By-Ay, Bz-Az


See also

blog comments powered by Disqus