Squirrel/Server/Functions/Spheres/ID
From Liberty Unleashed Wiki
(Difference between revisions)
(New page: __NOTOC__ This ''Sphere'' class member returns the ID of the sphere. == Syntax == <code>int Sphere.ID</code> == Arguments == * '''none''' == Example == {{Squirrel/NeedsExample}} <code...) |
(→Example) |
||
Line 11: | Line 11: | ||
== Example == | == Example == | ||
− | |||
<code lang="squirrel"> | <code lang="squirrel"> | ||
− | + | function onPlayerFootSphereHit( player, sphere ) | |
+ | { | ||
+ | MessagePlayer( "The current id of this sphere is: " + sphere.ID, player ) | ||
+ | } | ||
</code> | </code> | ||
+ | |||
+ | This example will message the player with the current ID of the sphere when they collect it. | ||
=== Notes === | === Notes === | ||
− | + | The call [[Squirrel/Server/Events/Player/onPlayerFootSphereHit|onPlayerFootSphereHit]] was used in in this example. More info about this in the corresponding page. | |
== Related Functions == | == Related Functions == | ||
{{Squirrel/Server/Functions/Spheres}} | {{Squirrel/Server/Functions/Spheres}} |
Revision as of 04:06, 8 March 2010
This Sphere class member returns the ID of the sphere.
Syntax
int Sphere.ID
Arguments
- none
Example
function onPlayerFootSphereHit( player, sphere ) { MessagePlayer( "The current id of this sphere is: " + sphere.ID, player ) }
This example will message the player with the current ID of the sphere when they collect it.
Notes
The call onPlayerFootSphereHit was used in in this example. More info about this in the corresponding page.