GetObjectScale: Difference between revisions
Jump to navigation
Jump to search
(OOP syntax added) |
mNo edit summary |
||
Line 9: | Line 9: | ||
{{OOP||[[object]]:getScale|scale|setObjectScale}} | {{OOP||[[object]]:getScale|scale|setObjectScale}} | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theObject''': | *'''theObject''': the [[object]] you wish to return the scale of. | ||
===Returns=== | ===Returns=== | ||
* A [[float]] indicating the scale of the object, if successful. | |||
* ''false'' otherwise. | |||
==Example== | ==Example== |
Revision as of 22:50, 4 October 2014
This function returns the visible size of an object.
Syntax
float getObjectScale ( object theObject )
OOP Syntax Help! I don't understand this!
- Method: object:getScale(...)
- Variable: .scale
- Counterpart: setObjectScale
Required Arguments
- theObject: the object you wish to return the scale of.
Returns
- A float indicating the scale of the object, if successful.
- false otherwise.
Example
Click to collapse [-]
ClientThis example adds a command get_scale which create object and prints out a scale of the object.
addCommandHandler( 'get_scale', function( ) local uObject = createObject( 1337, getElementPosition( localPlayer ) ) outputChatBox( string.format( 'Object scale is %s !', getObjectScale( uObject ) ) ) end )
See Also