SetElementCollisionsEnabled: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Moved the section) |
||
Line 14: | Line 14: | ||
Returns ''true'' if the collisions were set succesfully, ''false'' otherwise. | Returns ''true'' if the collisions were set succesfully, ''false'' otherwise. | ||
==Example== | |||
<section name="Server" class="server" show="false"> | <section name="Server" class="server" show="false"> | ||
This example enables collisions for all vehicles within a certain radius of a player: | This example enables collisions for all vehicles within a certain radius of a player: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> |
Revision as of 14:09, 11 August 2007
This function can disable or enable an element's collisions. An element without collisions does not interact with the physical environment and remains static.
Syntax
bool setElementCollisionsEnabled ( element theElement, bool enabled )
Required Arguments
- theElement: The element you wish to set the collisions of
- enabled: A boolean to indicate whether collisions are enabled (true) or disabled (false)
Returns
Returns true if the collisions were set succesfully, false otherwise.
Example
Click to expand [+]
ServerSee 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