Squirrel/Server/Functions/Checkpoints/Type

From Liberty Unleashed Wiki
Revision as of 15:56, 7 January 2010 by Force (Talk | contribs)

Jump to: navigation, search

This Checkpoint class member returns or sets the type of the checkpoint. Checkpoint type means how it can be hit (on foot, using a vehicle...). Defaults to MARKER_TYPE_BOTH.

Syntax

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

  1. int Checkpoint.Type
  1. Checkpoint.Type = int type

Arguments

  • type - This is ID of the new type.

Example 1. Returning

  1.  
  2. function onPlayerFootCheckpointHit( player, checkpoint )
  3. {
  4. MessagePlayer( "The current checkpoint type for this checkpoint is: " + checkpoint.Type, player );
  5. }
  6.  

Notes

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

Example 2. Setting

  1.  
  2. function onPlayerFootCheckpointHit( player, checkpoint )
  3. {
  4. checkpoint.Type = 2;
  5. }
  6.  

Notes

This example will change the type of checkpoint to ID 2 when a player enters it.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox