Squirrel/Server/Functions/Checkpoints/Radius
From Liberty Unleashed Wiki
(Difference between revisions)
(New page: __NOTOC__ This ''Checkpoint'' class member returns or sets the radius of the given checkpoint. == Syntax == You can either return or set a new value for this member: <code>float Checkpoin...) |
(→Example 1. Returning) |
||
Line 13: | Line 13: | ||
== Example 1. Returning == | == Example 1. Returning == | ||
− | |||
<code lang="squirrel"> | <code lang="squirrel"> | ||
− | + | function onPlayerFootCheckpointHit( player, checkpoint ) | |
+ | { | ||
+ | MessagePlayer( "The current radius of this checkpoint is: " + checkpoint.Radius, player ) | ||
+ | } | ||
</code> | </code> | ||
=== Notes === | === Notes === | ||
− | + | This example will message the player with the current radius of the checkpoint. | |
== Example 2. Setting == | == Example 2. Setting == |
Revision as of 15:52, 7 January 2010
This Checkpoint class member returns or sets the radius of the given checkpoint.
Syntax
You can either return or set a new value for this member:
float Checkpoint.Radius
Checkpoint.Radius = float fRadius
Arguments
- fRadius - This is the new radius of the checkpoint.
Example 1. Returning
function onPlayerFootCheckpointHit( player, checkpoint ) { MessagePlayer( "The current radius of this checkpoint is: " + checkpoint.Radius, player ) }
Notes
This example will message the player with the current radius of the 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