Sphere.Pos
From Liberty Unleashed Wiki
This Sphere class member returns or sets the position of the given sphere.
Syntax
You can either return or set a new value using this member:
Vector Sphere.Pos
Sphere.Pos = Vector vPos
Arguments
- vPos - This is the position of the sphere as a vector
Example 1. Returning
function onPlayerFootSphereHit( player, sphere ) { MessagePlayer( "The current position of this sphere is: " + sphere.Pos, player ) }
This example will return the position of the sphere when the player hits it.
Example 2. Setting
function onPlayerFootSphereHit( player, sphere ) { sphere.Pos = Vector( player.Pos.x + 2, player.Pos.y, player.Pos.z ); }
This example will set the position of the sphere to be 2 x co-ordinates away from the player that hit it.
Notes
The call onPlayerFootSphereHit was used in in this example. More info about this in the corresponding page.