Scripting/Squirrel/Functions/Object.Pos

From Vice City Multiplayer
Revision as of 16:11, 9 March 2016 by KAKAN (talk | contribs) (Created page with "Returns or sets the postion of an object in Vector. == Syntax == <pre>object.Pos</pre> == Arguments == * ''CObject'' '''object''' === Optional Arguments === * ''Vector'' ''...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

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 );
}