Squirrel/Server/Functions/Checkpoints/Type
From Liberty Unleashed Wiki
(Difference between revisions)
(→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:
int Checkpoint.Type
Checkpoint.Type = int type
Arguments
- type - This is ID of the new type.
Example 1. Returning
function onPlayerFootCheckpointHit( player, checkpoint ) { MessagePlayer( "The current checkpoint type for this checkpoint is: " + checkpoint.Type, player ); }
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
-- todo
Notes
-- Example notes/used functions here