SetElementAngularVelocity

From Multi Theft Auto: Wiki
Revision as of 20:03, 12 September 2018 by LordHenry (talk | contribs) (Requirements)
Jump to navigation Jump to search

Sets the angular velocity of a specified, supported element (Applies a spin to it).

Syntax

bool setElementAngularVelocity ( element theElement, float rx, float ry, float rz )           

OOP Syntax Help! I don't understand this!

Method: element:setAngularVelocity(...)
Variable: .angularVelocity
Counterpart: getElementAngularVelocity


Required Arguments

Returns

Returns true if it was succesful, false otherwise.

Example

function onColShapeHit ( thePlayer, matchingDimension )
    -- When a player hits the collision shape, give him a spin
    setElementAngularVelocity ( thePlayer, 0, 0, 20 )
end
addEventHandler ( "onColShapeHit", root, onColShapeHit )

Requirements

This template will be deleted.

See Also