getResourceDynamicElementRoot
Shared
Returns the element under which the elements the resource creates by script are placed. It is a child of the resource's element and is called dynamic.
element|false getResourceDynamicElementRoot([resource|string resource = getThisResource()])
Parameters
| Name | Type | Description |
|---|---|---|
| resource | resource|string | The resource, or its name. Without it, the calling resource.default getThisResource() |
Returns
The element, or false if the resource is not running.
Example
local dynamic = getResourceDynamicElementRoot()
for _, child in ipairs(getElementChildren(dynamic)) do
outputDebugString(getElementType(child))
end