Checkpoint.VirtualWorld

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This Checkpoint class member returns or sets the virtual world for the checkpoint.

Syntax

You can either return or set a new value using this member:

  1. int Checkpoint.VirtualWorld
  1. Checkpoint.VirtualWorld = int world
  1. Checkpoint.VirtualWorld = false;

Arguments

  • world - This is the new virtual world of the checkpoint.

Example 1. Returning

This example will message the player with the type ID for that checkpoint.

  1.  
  2. function onPlayerEnterCheckpoint( player, checkpoint )
  3. {
  4. MessagePlayer( "The current virtual world for this checkpoint is: " + checkpoint.VirtualWorld, 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 change the virtual world of the checkpoint to ID 2 when a player enters it.

  1.  
  2. function onPlayerEnterCheckpoint( player, checkpoint )
  3. {
  4. checkpoint.VirtualWorld = 2;
  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