Squirrel/Server/Functions/Checkpoints/Remove
From Liberty Unleashed Wiki
(Difference between revisions)
(→Example) |
|||
Line 1: | Line 1: | ||
− | + | {{Squirrel/Title|Checkpoint.Colour}} | |
− | This function removes the | + | 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 | + | function onPlayerEnterCheckpoint( player, checkpoint ) |
{ | { | ||
− | + | checkpoint.Remove(); | |
+ | |||
+ | return 1; | ||
} | } | ||
</code> | </code> | ||
Line 20: | Line 24: | ||
=== Notes === | === Notes === | ||
− | + | 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
This function removes the checkpoint.
Syntax
bool Checkpoint.Remove()
Arguments
- none
Example
This example will remove the checkpoint when a player enters it.
function onPlayerEnterCheckpoint( player, checkpoint ) { checkpoint.Remove(); return 1; }
Notes
The event onPlayerEnterCheckpoint was used in this example. More info about it in the corresponding page.