Es createvectorstring

From EventScripts Community Encyclopedia


Overview

Syntax: es_createvectorstring <output-var> <x> <y> <z>

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_xcreatevectorstring

Description

Creates a vector string (stored in outputvar) that contains x, y, and z.


Parameters

  • outputvar - the name of the variable where the actual vector will be stored.
  • x - the name of the variable which holds the x position.
  • y - the name of the variable which holds the y position.
  • z - the name of the variable which holds the z position.


Examples

// This will initialize our variable
es_xsetinfo vector 0
// This will create the vector string
es_createvectorstring vector server_var(x) server_var(y) server_var(z)
// This is what a vector string looks like
"1032.02,-234.56,-86.34"


Notes

  • This is equivilant to doing es_format vector "%1,%2,%3" server_var(x) server_var(y) server_var(z)


See also

blog comments powered by Disqus