Squirrel/Client/Events/Checkpoint/onClientEnterCheckpoint
From Liberty Unleashed Wiki
(Difference between revisions)
(Created page with '{{Squirrel/Title|onClientEnterCheckpoint}} This event is called when the local player enters a checkpoint == Syntax == <code>function onClientEnterCheckpoint( checkpoint )</cod…') |
(Example added) |
||
Line 12: | Line 12: | ||
== Example == | == Example == | ||
− | + | This code will message the player with the ID of the checkpoint. | |
− | + | ||
<code lang="squirrel"> | <code lang="squirrel"> | ||
− | + | function onClientEnterCheckpoint( checkpoint ) | |
+ | { | ||
+ | Message("You have entered checkpoint " + checkpoint.ID); | ||
+ | } | ||
</code> | </code> | ||
=== Notes === | === Notes === | ||
− | + | The function [[Squirrel/Client/Functions/Messages/Message|Message]] was used in this example. More info about it in its corresponding page. | |
== Related Events == | == Related Events == |
Latest revision as of 02:18, 2 August 2011
This event is called when the local player enters a checkpoint
[edit] Syntax
function onClientEnterCheckpoint( checkpoint )
[edit] Arguments
- checkpoint - The pointer of the checkpoint entered
[edit] Example
This code will message the player with the ID of the checkpoint.
function onClientEnterCheckpoint( checkpoint ) { Message("You have entered checkpoint " + checkpoint.ID); }
[edit] Notes
The function Message was used in this example. More info about it in its corresponding page.
[edit] Related Events
- onClientEnterCheckpoint
- onClientExitCheckpoint
- onClientEnterSphere
- onClientExitSphere