EngineRestoreObjectGroupPhysicalProperties: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
TheNormalnij (talk | contribs) (There is no "property" argument) |
||
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> |
Revision as of 22:02, 17 May 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)
Requirements
This template will be deleted.
See Also
- createObject
- getObjectScale
- moveObject
- setObjectScale
- stopObject
- getObjectMass
- getObjectProperty
- setObjectMass
- setObjectProperty