Squirrel/Server/Functions/Checkpoints/Pos
From Liberty Unleashed Wiki
This Checkpoint class member returns or sets the position of the given checkpoint.
Syntax
You can either return or set a new value using this member:
Vector Checkpoint.Pos
Checkpoint.Pos = Vector vPos
Arguments
- vPos - This is the position of the checkpoint as a vector.
Example 1. Returning
function onPlayerFootCheckpointHit( player, checkpoint ) { MessagePlayer( "The current Position of this checkpoint is: " + checkpoint.Pos, player ) }
Notes
This example will message the player with the current position of the checkpoint.
Example 2. Setting
function onPlayerFootCheckpointHit( player, checkpoint ) { checkpoint.Pos = Vector( player.Pos.x + 2, player.Pos.y, player.Pos.z ); }
Notes
This example will move the checkpoint 2 x coordinates away from the player when they enter the checkpoint.