engineSetObjectGroupPhysicalProperty | Multi Theft Auto: Wiki Skip to content

engineSetObjectGroupPhysicalProperty

Client-side
Server-side
Shared

Pair: engineGetObjectGroupPhysicalProperty

This function sets physical property of given properties group.

OOP Syntax Help! I don't understand this!

  • Method:Engine.setObjectGroupPhysicalProperty(...)

Syntax

bool engineSetObjectGroupPhysicalProperty ( ​int groupID, ​string property, ​var newValue )
Required Arguments
  • groupID: The id of physical properties group which you wish to set a property of.
  • property: The property which you wish to set. See physical properties.
  • newValue: New value of the property, with proper type.

Returns

  • bool: result

Returns true if everything went well, error is raised otherwise.

Code Examples

client
function lamppostCollision()
engineSetObjectGroupPhysicalProperty(111, "cause_explosion", true)
end
addEventHandler("onClientResourceStart", resourceRoot, lamppostCollision)
-- Every time you hit a lamppost, an explosion will be created

See Also

Engine Functions