Difference between revisions of "Vector"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(this is both a data type and a constructor, so adding the dafunction template)
Line 1: Line 1:
'''vector''' is a basic data type in Dragon Age's scripting language. It is a series of [[float]]s that define an X, Y, Z coordinate in a map.
+
{{dafunction
 +
|name = Vector
 +
|brief = Returns a new vector with the specified x,y and z values.  
 +
|param1type = float
 +
|param1name = x
 +
|param1desc = x value for the vector
 +
|param1default = 0.0
 +
|param2type = float
 +
|param2name = y
 +
|param2desc = y value for the vector
 +
|param2default = 0.0
 +
|param3type = float
 +
|param3name = z
 +
|param3desc = z value for the vector
 +
|param3default = 0.0
 +
|returntype = vector
 +
|returndesc = A vector with the specified x, y and z values
 +
|sourcefile = script.ldf
 +
}}
  
Example declaration:
+
'''vector''' is a basic data type in Dragon Age's scripting language. It is a series of [[float]]s that define an X, Y, Z coordinate in a map.
<dascript>
+
    vector vVector = Vector(0.0f, 1.1f, 2.2f);
+
</dascript>
+
  
 
Note that this is not identical to the [[location]] data type, which contains additional information for placing objects in-world.
 
Note that this is not identical to the [[location]] data type, which contains additional information for placing objects in-world.
  
 
[[Category:Data types]]
 
[[Category:Data types]]

Revision as of 03:19, 27 July 2009

Returns a new vector with the specified x,y and z values.

vector Vector(
float x = 0.0,
float y = 0.0,
float z = 0.0
);
Parameters:
x
x value for the vector
y
y value for the vector
z
z value for the vector
Returns:

A vector with the specified x, y and z values

Source:

script.ldf

vector is a basic data type in Dragon Age's scripting language. It is a series of floats that define an X, Y, Z coordinate in a map.

Note that this is not identical to the location data type, which contains additional information for placing objects in-world.