Checkpoint.Radius

From Liberty Unleashed Wiki
Revision as of 20:09, 24 September 2010 by Juppi (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

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:

  1. float Checkpoint.Radius
  1. 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.

  1.  
  2. function onPlayerEnterCheckpoint( player, checkpoint )
  3. {
  4. MessagePlayer( "The current radius of this checkpoint is: " + checkpoint.Radius, player );
  5. return 1;
  6. }
  7.  

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.

  1.  
  2. function onPlayerEnterCheckpoint( player, checkpoint )
  3. {
  4. checkpoint.Radius = checkpoint.Radius + 1.0;
  5. return 1;
  6. }
  7.  

Notes

The event onPlayerEnterCheckpoint was used in this example. More info about it in the corresponding page.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox