SetObjectScale
Jump to navigation
Jump to search
This function changes the visible size of an object.
Syntax
bool setObjectScale ( element theElement, float scale )
Required Arguments
- theElement: The element you wish to change the size of.
- scale: a float containing the new scale.
Returns
Returns true if the scale was set properly, false otherwise.
Example
This example creates an antenna, and changes the size of it.
-- get the position of the player local x, y, z = getElementPosition(getLocalPlayer()) -- create the object antenna = createObject (1595, x + 2, y, z ) if ( antenna ) then -- if it was created -- set the scale setObjectScale ( antenna, 0.5) -- remove the collision setElementCollisionsEnabled (antenna, false) end
See Also