03BC

From GTAMods Wiki
Jump to navigation Jump to search
Spheres in Vice City of varying scale, from left to right: 2.0, 1.5, 1.0, 0.5. Each sphere is spaced 2.0 meters apart. ▷ Play video of scale 1.0.

GTA III Vice City San Andreas ADD_SPHERE


Description
Creates a sphere
Syntax
03BC: [var] = create_sphere [flt1] [flt2] [flt3] [flt4]
Parameter
[var]
Variable to store the handle of the sphere
[flt1]
X-coordinate
[flt2]
Y-coordinate
[flt3]
Z-coordinate
[flt4]
Scale/diameter

This opcode creates a "sphere", which is a translucent cylinder that pulsates in size. The sphere serves only as a visual marker; it is not interactable. The center of the sphere will always place itself directly on the ground and cannot float in the air. The larger the scale value is, the larger the sphere. Negative values are actually valid; they just invert the sphere. Legacy documentation describes the scale as a "radius" but a value of 1.0 will create a sphere with a diameter of 1.0. In GTA III the color is blue, in Vice City it is pink, and in San Andreas it is red.

A maximum of 16 spheres can be physically created at a time but a smaller number of spheres can be visible at a time in the world. Spheres created by other opcodes like 02A7 also limits the number of visible spheres in the world. When the visual limit is passed, spheres can still be physically created but they will not be visible. Removing the visibility of one sphere can cause the visibility of another sphere to be restored.

The sphere can be removed by calling 03BD. When recreating a sphere after you removed it, you must wait until the sphere visually disappears before creating another one or else the new sphere would not update to its recreated properties.

Keywords

add, create, sphere, cylinder, marker