SixL client API / colshapes / ColshapeMpPool
Interface: ColshapeMpPool
The colshapes this client made: mp.colshapes.
Example
for (const shape of mp.colshapes.toArray()) shape.destroy();
Properties
length
readonlylength:number
The number of colshapes this client made and has not destroyed.
Example
const count = mp.colshapes.length;
Methods
at()
at(id):ColshapeMp
The colshape with this number, or undefined.
Parameters
id
number
The colshape's number on this client.
Returns
The colshape, or undefined.
Example
const zone = mp.colshapes.at(1);
exists()
exists(shape):boolean
Whether the colshape (or the number) is in the pool.
Parameters
shape
number | ColshapeMp
The colshape, or its number.
Returns
boolean
true while it exists.
Example
if (mp.colshapes.exists(zone)) { }
newCircle()
newCircle(x,y,range,dimension?):ColshapeMp
Makes a circle: a round zone of any height.
Parameters
x
number
The centre's x.
y
number
The centre's y.
range
number
The radius, metres.
dimension?
number
The dimension (0 by default).
Returns
The new colshape.
Remarks
Partial: not yet confirmed in the game.
Example
const zone = mp.colshapes.newCircle(10, 20, 5);
newCuboid()
newCuboid(x,y,z,width,depth,height,dimension?):ColshapeMp
Makes a cuboid centred on a point.
Parameters
x
number
The centre's x.
y
number
The centre's y.
z
number
The centre's z.
width
number
Its size along x, metres.
depth
number
Its size along y, metres.
height
number
Its size along z, metres.
dimension?
number
The dimension (0 by default).
Returns
The new colshape.
Remarks
Partial: not yet confirmed in the game.
Example
const zone = mp.colshapes.newCuboid(10, 20, 30, 4, 4, 3);
newRectangle()
newRectangle(x,y,width,height,dimension?):ColshapeMp
Makes a rectangle centred on a point: of any height.
Parameters
x
number
The centre's x.
y
number
The centre's y.
width
number
Its size along x, metres.
height
number
Its size along y, metres.
dimension?
number
The dimension (0 by default).
Returns
The new colshape.
Remarks
Partial: not yet confirmed in the game.
Example
const zone = mp.colshapes.newRectangle(10, 20, 8, 6);
newSphere()
newSphere(x,y,z,range,dimension?):ColshapeMp
Makes a sphere.
Parameters
x
number
The centre's x.
y
number
The centre's y.
z
number
The centre's z.
range
number
The radius, metres.
dimension?
number
The dimension (0 by default).
Returns
The new colshape.
Remarks
Partial: not yet confirmed in the game.
Example
const zone = mp.colshapes.newSphere(10, 20, 30, 5);
newTube()
newTube(x,y,z,range,height,dimension?):ColshapeMp
Makes a tube: a circle that rises from a point by its height.
Parameters
x
number
The bottom centre's x.
y
number
The bottom centre's y.
z
number
The bottom centre's z.
range
number
The radius, metres.
height
number
How high it rises, metres.
dimension?
number
The dimension (0 by default).
Returns
The new colshape.
Remarks
Partial: not yet confirmed in the game.
Example
const zone = mp.colshapes.newTube(10, 20, 30, 5, 10);
toArray()
toArray(): ColshapeMp[]
The colshapes as an array.
Returns
The colshapes.
Example
const all = mp.colshapes.toArray();