EngineRestoreObjectGroupPhysicalProperties: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
{{New feature/item|3.0157|1.5.7|19626|This function restores physical | {{New feature/item|3.0157|1.5.7|19626|This function restores all physical properties of given properties group.}} | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">bool engineRestoreObjectGroupPhysicalProperties ( int groupID | <syntaxhighlight lang="lua">bool engineRestoreObjectGroupPhysicalProperties ( int groupID )</syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''groupID''': the id of physical properties group which you wish to restore | *'''groupID''': the id of physical properties group which you wish to restore. | ||
===Returns=== | ===Returns=== | ||
Returns '''true''' if everything went well, error is raised otherwise. | Returns '''true''' if everything went well, error is raised otherwise. | ||
==Example== | ==Example== | ||
<section name="Client" class="client" show="true"> | <section name="Client" class="client" show="true"> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function | function restorePhysicalGroup(_, group) | ||
engineRestoreObjectGroupPhysicalProperties(tonumber(group) | engineRestoreObjectGroupPhysicalProperties(tonumber(group)) | ||
end | end | ||
addCommandHandler ( " | addCommandHandler ( "restorePhysicalGroup", restorePhysicalGroup ) | ||
-- | --restorePhysicalGroup(120) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> | ||
==See Also== | ==See Also== | ||
{{Client_object_functions}} | {{Client_object_functions}} |
Latest revision as of 17:18, 7 November 2024
This function restores all physical properties of given properties group.
Syntax
bool engineRestoreObjectGroupPhysicalProperties ( int groupID )
Required Arguments
- groupID: the id of physical properties group which you wish to restore.
Returns
Returns true if everything went well, error is raised otherwise.
Example
Click to collapse [-]
Clientfunction restorePhysicalGroup(_, group) engineRestoreObjectGroupPhysicalProperties(tonumber(group)) end addCommandHandler ( "restorePhysicalGroup", restorePhysicalGroup ) --restorePhysicalGroup(120)
See Also
- createObject
- getObjectScale
- moveObject
- setObjectScale
- stopObject
- getObjectMass
- getObjectProperty
- setObjectMass
- setObjectProperty