Sphere.Radius
From Liberty Unleashed Wiki
This Sphere class member returns or sets the radius of the given sphere.
Syntax
You can either return or set a new value for this member:
float Sphere.Radius
Sphere.Radius = float fRadius
Arguments
- fRadius - This is the new radius of the sphere.
Example 1. Returning
function onPlayerFootSphereHit( player, sphere ) { MessagePlayer( "The current radius of this sphere is: " + sphere.Radius, player ) }
This example will message the player with the current radius of the sphere.
Example 2. Setting
function onPlayerFootSphereHit( player, sphere ) { sphere.Radius += 1; }
This example will increase the radius of the sphere by 1 every time a player enters it.
Notes
The call onPlayerFootSphereHit was used in in this example. More info about this in the corresponding page.