SixL client API / game/shapetest / GameShapetestMp
Interface: GameShapetestMp
The shape test functions. SixL starts line-of-sight probes; reading a probe's result is not available yet.
Example
const probe = await mp.game.shapetest.startShapeTestLosProbe(0, 0, 70, 0, 10, 70, 4);
Methods
startShapeTestLosProbe()
startShapeTestLosProbe(x1,y1,z1,x2,y2,z2,flags,entity?,p8?):Promise<number>
Starts a line-of-sight probe: a test of what the line between two points hits.
Parameters
x1
number
The start point's X coordinate, in metres.
y1
number
The start point's Y coordinate, in metres.
z1
number
The start point's Z coordinate, in metres.
x2
number
The end point's X coordinate, in metres.
y2
number
The end point's Y coordinate, in metres.
z2
number
The end point's Z coordinate, in metres.
flags
number
The kinds of thing the line may hit, as a bit mask of the game's intersection flags.
entity?
number | { handle: number; }
An entity the line ignores, or its handle. Optional: without it the line ignores nothing.
p8?
number
A flag of the game, 0 by default.
Returns
Promise<number>
A Promise of the probe's handle, as a number.
Example
const handle = await mp.game.shapetest.startShapeTestLosProbe(0, 0, 70, 0, 10, 70, 4, player);