Squirrel/Server/Functions/Checkpoints/Type

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Example 1. Returning)
(Example)
Line 11: Line 11:
 
* '''type''' - This is ID of the new [[Squirrel/Server/Constants#Marker_Types|type]].
 
* '''type''' - This is ID of the new [[Squirrel/Server/Constants#Marker_Types|type]].
  
== Example ==
+
== Example 1. Returning ==
  
 
<code lang="squirrel">
 
<code lang="squirrel">

Revision as of 15:55, 7 January 2010

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

This function needs an example. You can help us complete the wiki by writing one, or maybe even more :o
  1.  
  2. -- todo
  3.  

Notes

-- Example notes/used functions here

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox