SetPersonScaleFactor
From Spheriki
Set or change the visual size of a person by a relative factor.
Contents |
Usage
- name String. The name of the person to change the spriteset size of.
- scale_w, scale_h Numbers. Factor to expand/shrink the width and height of the person's appearance. Should be greater than zero. 1 = no change, 2 = double, etc.
Examples
The following line will cause the person named "Bob" to appear twice as high as before:
SetPersonScaleFactor("Bob", 1, 2);
The following line of code will reduce the current person's width to half of what it was, while making them three times as high, if called during a person script (like ON_ACTIVATE_TALK, see SetPersonScript() for more details.)
SetPersonScaleFactor(GetCurrentPerson(), 0.5, 3);
Notes
- If you want to resize a person to a particular width and height, it may be easier to use SetPersonScaleAbsolute(), with which you only need to set the desired target width and height of your new size.
- TODO: Verify that persons that share the same spriteset do not change in visual size.
- TODO: Check if the base footprint size of the person changes or stays the same.
- TODO: Check if there is a corresponding GetPersonScaleFactor() function, because it isn't listed in the Functions page.