object.set_scale
This function changes the size of the context object's visual model. Objects can be made smaller or larger.
This function applies to the object's visuals and to hit detection against bullets, projectiles, and thrown grenades: an object that is scaled up can be shot in any of the enlarged areas and register damage normally, and it can also be stuck with grenades on the enlarged areas. However, scaling does not apply to physical collisions or splash damage processing. An object that is made larger will not take splash damage from an explosion unless the explosion would, at the same distance from the object's pivot point, deal splash damage to a normally sized object of that type.
Arguments
- scale
The scale to apply to this object, with the value 100 representing normal (100%) size. Values must be greater than zero to have any effect.
Example
current_object.set_scale(200) -- make the object twice as large
Notes
Rescaling a player's biped will not necessarily change their camera position. Scaling a player up, for example, will cause their first-person legs to appear much larger to them, but will not actually move the camera upward to match the rescaled head.
The
set_scale
function has been observed to fail under the following conditions: the context object was created and attached to another object during the same tick as theset_scale
call and before theset_scale
call; and the object to which it was attached already existed before the tick on which the call was made.