RespawnObject: Difference between revisions
Jump to navigation
Jump to search
m (OOP) |
mNo edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{ | {{Shared function}} | ||
This function respawns a specific object. | This function respawns a specific object. | ||
{{New feature/item|3.0161|1.6.0|22708|This function is now also available on the server side.}} | |||
==Syntax== | ==Syntax== | ||
Line 23: | Line 24: | ||
==See Also== | ==See Also== | ||
{{ | {{Shared_object_functions}} |
Latest revision as of 12:10, 4 September 2024
This function respawns a specific object.
Syntax
bool respawnObject ( object theObject )
OOP Syntax Help! I don't understand this!
- Method: object:respawn(...)
Required Arguments
- theObject: an object element
Returns
- true if the object was sucessfully respawned.
- false if the object is not breakable, or a wrong object was given.
Example
This example prevents objects from despawning. When an object breaks, it gets respawned right away.
addEventHandler ( "onClientObjectBreak", getRootElement(), function () respawnObject ( source ) end )
See Also