Squirrel/Server/Functions/Checkpoints/Remove

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Example)
Line 1: Line 1:
__NOTOC__
+
{{Squirrel/Title|Checkpoint.Colour}}
This function removes the given checkpoint.
+
This function removes the checkpoint.
  
 
== Syntax ==
 
== Syntax ==
Line 10: Line 10:
  
 
== Example ==
 
== Example ==
 +
 +
This example will remove the checkpoint when a player enters it.
  
 
<code lang="squirrel">
 
<code lang="squirrel">
function onPlayerFootCheckpointHit( player, checkpoint )
+
function onPlayerEnterCheckpoint( player, checkpoint )
 
{
 
{
checkpoint.Remove()
+
    checkpoint.Remove();
 +
   
 +
    return 1;
 
}
 
}
 
</code>
 
</code>
Line 20: Line 24:
 
=== Notes ===
 
=== Notes ===
  
This example will remove the checkpoint when a player enters it.
+
The event [[Squirrel/Server/Events/Marker/onPlayerEnterCheckpoint|onPlayerEnterCheckpoint]] was used in this example. More info about it in the corresponding page.
  
 
== Related Functions ==
 
== Related Functions ==
  
 
{{Squirrel/Server/Functions/Checkpoints}}
 
{{Squirrel/Server/Functions/Checkpoints}}

Revision as of 20:12, 24 September 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function removes the checkpoint.

Syntax

  1. bool Checkpoint.Remove()

Arguments

  • none

Example

This example will remove the checkpoint when a player enters it.

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