SetElementCallPropagationEnabled
Jump to navigation
Jump to search
This function enables/disables call propagation on a certain element. Look at the example for a practical application.
Syntax
bool setElementCallPropagationEnabled ( element theElement, bool enabled )
OOP Syntax Help! I don't understand this!
- Note: This function is also a static function underneath the Element class.
- Method: element:setCallPropagationEnabled(...)
Required Arguments
- theElement: The element whose propagation behaviour you'd like to change
- enabled: Whether propagation should be enabled or not
Returns
Returns true, if the propagation behaviour has been changed successfully, false otherwise.
Example
Click to collapse [-]
Clientlocal parentImage = guiCreateStaticImage(0, 0, 64, 64, "img1.png", false) local childImage = guiCreateStaticImage(0, 0, 16, 16, "img2.png", false, parentImage) -- Disable call propagation setElementCallPropagationEnabled(parentImage, false) -- Load another image guiStaticImageLoadImage(parentImage, "img3.png") --[[ Normally (enabled call propagation) both parentImage and childImage would contain "img3.png" now. Due to disabled call propagation only parentImage will contain "img3.png" now (the call was not propagated down the tree) ]]
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