Sphere.VirtualWorld

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function sets or return the VirtualWorld of a sphere

Syntax

  1. Sphere.VirtualWorld = int

Example

Get the VirtualWorld of a Sphere

  1.  
  2. function onPlayerCommand ( pPlayer, szCommand, szParams ) {
  3.  
  4. switch ( szCommand ) {
  5.  
  6. case "get": {
  7.  
  8. local Sphere = FindSphere ( 0 );
  9. if ( Sphere ) {
  10. MessagePlayer ( "VirtualWorld: " + Sphere.VirtualWorld, pPlayer );
  11. return;
  12. }
  13.  
  14. MessagePlayer ( "No sphere with id 0 found!", pPlayer );
  15.  
  16. return;
  17. }
  18. }
  19. }
  20.  

Notes

The function Spheres.VirtualWorld and call onPlayerCommand were used in in this example. More info about them in corresponding pages.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox