CreateSphereZone
A ball-shaped zone around a point - a target hung in the air, or the space around a prop.
A player is inside when their position of record is within radius of the centre, like any zone; as a target
(SetZoneHittable) it catches what flies or swings into the ball.
Syntax
Section titled “Syntax”CreateSphereZone(x, y, z, radius)| Parameter | Type | |
|---|---|---|
x |
number | the centre, metres |
y |
number | metres |
z |
number | metres |
radius |
number | metres |
Returns
Section titled “Returns”number - the zone’s id; nil when none is free
Example
Section titled “Example”local apple = CreateSphereZone(1290, 1100, 28.1, 0.08) -- an apple on a post: hit it from twenty pacesSetZoneHittable(apple, true)See also
Section titled “See also”SetZoneHittable · AttachZoneToEntity · CreateZone · the Zones group of the index
