GetColShapeType: Difference between revisions
Jump to navigation
Jump to search
CrosRoad95 (talk | contribs) (Created page with "{{Server client function}} __NOTOC__ {{New feature/item|3.0156|1.5.5|12251|This function is used to retrieve the type of an colshape.}} ==Syntax== <syntaxhighlight lang="lua...") |
CrosRoad95 (talk | contribs) (typo) |
||
Line 10: | Line 10: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theColshape:''' The [[ | *'''theColshape:''' The [[colshape]] you wish to get the type of. | ||
===Returns=== | ===Returns=== |
Revision as of 06:48, 1 July 2018
This function is used to retrieve the type of an colshape.
Syntax
string getColShapeType ( colshape theColShape )
OOP Syntax Help! I don't understand this!
- Method: colshape:getShapeType(...)
- Variable: .shapeType
Required Arguments
- theColshape: The colshape you wish to get the type of.
Returns
Returns a string containing the colshapetype, false if invalid arguments were passed.
Example
Click to collapse [-]
SharedThis example show type of every possible shape type.
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), circle:getShapeType(), circle.shapeType) iprint("cubboid",getColShapeType(cubboid), cubboid:getShapeType(), cubboid.shapeType) iprint("sphere",getColShapeType(sphere), sphere:getShapeType(), sphere.shapeType) iprint("rectangle",getColShapeType(rectangle), rectangle:getShapeType(), rectangle.shapeType) iprint("polygon",getColShapeType(polygon), polygon:getShapeType(), polygon.shapeType) iprint("tube",getColShapeType(tube), tube:getShapeType(), tube.shapeType)
See Also
- attachElements
- createElement
- destroyElement
- detachElements
- getAttachedElements
- getElementAlpha
- getElementAttachedOffsets
- getElementAttachedTo
- getElementByIndex
- getElementByID
- getElementChild
- getElementChildren
- getElementChildrenCount
- getElementCollisionsEnabled
- getElementColShape
- getElementData
- getAllElementData
- hasElementData
- getElementDimension
- getElementHealth
- getElementID
- getElementInterior
- getElementMatrix
- getElementModel
- getElementParent
- getElementPosition
- getElementRotation
- getElementsByType
- getElementsWithinColShape
- getElementsWithinRange
- getElementType
- getElementVelocity
- getLowLODElement
- getRootElement
- isElement
- isElementAttached
- isElementCallPropagationEnabled
- isElementDoubleSided
- isElementFrozen
- isElementInWater
- isElementLowLOD
- isElementWithinColShape
- isElementWithinMarker
- setElementAlpha
- setElementAngularVelocity
- getElementAngularVelocity
- setElementAttachedOffsets
- setElementCallPropagationEnabled
- setElementCollisionsEnabled
- setElementData
- setElementDimension
- setElementDoubleSided
- setElementFrozen
- setElementHealth
- setElementID
- setElementInterior
- setElementModel
- setElementParent
- setElementPosition
- setElementRotation
- setElementVelocity
- setLowLODElement
- getPedContactElement
- getResourceDynamicElementRoot
- getResourceRootElement