Squirrel/Server/Functions/Spheres/ID

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m (testing confirmedit)
Line 10: Line 10:
  
 
== Example ==
 
== Example ==
 +
 +
This example will message the player with the current ID of the sphere when they enter it.
  
 
<code lang="squirrel">
 
<code lang="squirrel">
Line 19: Line 21:
 
}
 
}
 
</code>
 
</code>
 
This example will message the player with the current ID of the sphere when they collect it.
 
  
 
=== Notes ===
 
=== Notes ===

Revision as of 00:32, 13 March 2011

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

This Sphere class member returns the ID of the sphere.

Syntax

  1. int Sphere.ID

Arguments

  • none

Example

This example will message the player with the current ID of the sphere when they enter it.

  1.  
  2. function onPlayerEnterSphere( player, sphere )
  3. {
  4. MessagePlayer( "The current id of this sphere is: " + sphere.ID, player );
  5. return 1;
  6. }
  7.  

Notes

The call onPlayerEnterSphere was used in this example. More info about this can be found in the corresponding page.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox