Scripting/Squirrel/Functions/Object.Pos

From Vice City Multiplayer
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 );
}

Related Functions