getColShapeType
Client-side
Server-side
Shared
This function is used to retrieve the type of an colshape.
OOP Syntax Help! I don't understand this!
- Method:colshape:getShapeType(...)
- Variable: .shapeType
Syntax
int|false getColShapeType ( colshape shape )Required Arguments
- shape: The colshape you wish to get the type of.
Returns
- int|false: colshape-type
- 0: circle
- 1: cuboid
- 2: sphere
- 3: rectangle
- 4: polygon
- 5: tube
Returns false if invalid arguments were passed, or an integer of the type of the colshape (see above).
Code Examples
shared
This example outputs the type of all colshapes.
local circle = createColCircle(0, 0, 1)local cubboid = createColCuboid(0, 0, 0, 0, 0, 0)local sphere = createColSphere(0, 0, 0, 0)local rectangle = createColRectangle(0, 0, 0, 0)local polygon = createColPolygon(0, 0, 0, 0, 0, 0, 0, 0)local tube = createColTube(0, 0, 0, 0, 0)
iprint("circle", getColShapeType(circle))iprint("cubboid", getColShapeType(cubboid))iprint("sphere", getColShapeType(sphere))iprint("rectangle", getColShapeType(rectangle))iprint("polygon", getColShapeType(polygon))iprint("tube", getColShapeType(tube))See Also
Colshape Functions
- addColPolygonPoint
- createColCircle
- createColCuboid
- createColPolygon
- createColRectangle
- createColSphere
- createColTube
- getColPolygonHeight
- getColPolygonPointPosition
- getColPolygonPoints
- getColShapeRadius
- getColShapeSize
- getColShapeType
- isInsideColShape
- removeColPolygonPoint
- setColPolygonHeight
- setColPolygonPointPosition
- setColShapeRadius
- setColShapeSize