IsObjectRespawnable: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Shared function}} {{New feature/item|3.0161|1.6.0|22708|This function checks if the object has respawn enabled, which can be toggled using toggleObjectRespawn.}} ==Syntax== <syntaxhighlight lang="lua">bool isObjectRespawnable( object theObject )</syntaxhighlight> {{OOP||object:isRespawnable}} ===Required Arguments=== *'''theObject:''' an object element. ===Returns=== Returns true if the object has respawning enabled, false otherwise. ==Examp...") |
(No difference)
|
Latest revision as of 12:20, 4 September 2024
Syntax
bool isObjectRespawnable( object theObject )
OOP Syntax Help! I don't understand this!
- Method: object:isRespawnable(...)
Required Arguments
- theObject: an object element.
Returns
Returns true if the object has respawning enabled, false otherwise.
Example
addCommandHandler('checkobjects', function() local count = 0 for k,v in ipairs(getElementsByType('object')) do if (isObjectRespawnable(v)) then count = count + 1 end end outputChatBox(count..' objects on map are respawnable!') end)
See Also