Scripting/Squirrel/Functions/Object.Pos: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "Returns or sets the postion of an object in Vector. == Syntax == <pre>object.Pos</pre> == Arguments == * ''CObject'' '''object''' === Optional Arguments === * ''Vector'' ''...") |
No edit summary |
||
Line 21: | Line 21: | ||
print( obj.Pos ); | print( obj.Pos ); | ||
}</pre> | }</pre> | ||
== Related Functions == | |||
{{Scripting/Squirrel/Functions/Object_Functions}} | |||
[[Category:Scripting/Squirrel/Functions/Object_Functions]] |
Latest revision as of 18:33, 30 January 2017
Returns or sets the postion of an object in Vector.
Syntax
object.Pos
Arguments
- CObject object
Optional Arguments
- Vector pos - The new vector postion for the object.
Return value
If the argument is null, then, it'll return the Vector instance of that object.
Example
function onScriptLoad() { CreateObject(1259, 0, Vector(-879.757, -576.008, 11.3371), 255).RotateTo( Quaternion(0, 0, 0.5, -0.866025), 0 ); local obj = FindObject(0); print( obj.Pos ); obj.Pos = Vector(0,0,0); print( obj.Pos ); }