Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:1.23

Description

Description:Changes the size (scale) of an object, in all three axis. Can be used to stretch, grow, or shrink an object.

For most objects, the scale resets itself at each game cycle (several times a second), especially if shooting or explosions occur near the object.

Scale of units is also reset, when entering and leaving vehicles. Therefore, this command should only be used in very controlled circumstances.

Note: In V2.0+, the scale is not reset each game cycle.

Syntax

Syntax:object setScale scale
Parameters:
  • object: Object - Object to scale.
  • scale: Array - Object size is multiplied by these numbers in each direction: [width, height, length]. Be aware that in V2.0-2.11, the array order is interpreted as: [width, length, height].
Return Value:Nothing

Examples

Examples:
player setScale [5,5,5];

Additional Information

See also: getScale
Multiplayer:
Problems:The hitzone (fire geometry) stays at the original size, and lighting is not calculated properly in case the scale is not uniform (does not have the same value for all 3 axis) (applies to V2.05 and lower).

Notes