getElementByID
Shared
Finds the first element with an ID, starting at an element and going down through its children.
element|nil getElementByID(string id [, element startAt = root])
Parameters
| Name | Type | Description |
|---|---|---|
| id | string | The ID to look for. |
| startAt | element | Where the search starts. It counts too.default root |
Returns
The element found, or nil if none has that ID.
Example
local gate = getElementByID("lspd_gate", resourceRoot)
if gate then
moveObject(gate, 3000, 1544.7, -1630.7, 10)
end