Checkpoint.Radius
From Liberty Unleashed Wiki
This Checkpoint class member returns or sets the radius of the checkpoint.
Syntax
You can either return or set a new value for this member:
float Checkpoint.Radius
Checkpoint.Radius = float fRadius
Arguments
- fRadius - This is the new radius of the checkpoint.
Example 1. Returning
This example will message the player with the current radius of the checkpoint.
function onPlayerEnterCheckpoint( player, checkpoint ) { MessagePlayer( "The current radius of this checkpoint is: " + checkpoint.Radius, player ); return 1; }
Notes
The function MessagePlayer and event onPlayerEnterCheckpoint were used in this example. More info about them in the corresponding pages.
Example 2. Setting
This example will increase the radius of the checkpoint by 1 unit every time a player enters it.
function onPlayerEnterCheckpoint( player, checkpoint ) { checkpoint.Radius = checkpoint.Radius + 1.0; return 1; }
Notes
The event onPlayerEnterCheckpoint was used in this example. More info about it in the corresponding page.