Sphere.Type
From Liberty Unleashed Wiki
This Sphere class member returns or sets the type of the sphere. Sphere type means how it can be hit (on foot, using a vehicle...). Defaults to MARKER_TYPE_BOTH.
Syntax
You can either return or set a new value using this member:
int Sphere.Type
Sphere.Type = int type
Arguments
- type - This is the ID of the new type
Example 1. Returning
function onPlayerFootSphereHit( player, sphere ) { MessagePlayer( "The current type for this sphere is: " + sphere.Type, player ); }
This example will message the player with the type ID for that sphere.
Example 2. Setting
function onPlayerFootSphereHit( player, sphere ) { sphere.Type = 2; }
This will change the spheres type to 2 when a player hits it.
Notes
The call onPlayerFootSphereHit was used in in this example. More info about this in the corresponding page.