GetPersonBase
From Spheriki
Get the X,Y bounding-box coordinates of a person's base, relative to the spriteset.
Contents |
[edit]
Usage
SpritesetBase GetPersonBase(person_name);
- person_name string. The name of the person.
- A SpritesetBase object is returned, with integer properties named (x1, y1, x2, y2).
[edit]
Examples
To get the lower-right X,Y coordinate of a person's base.
var x = GetPersonBase("Bob").x2;
var y = GetPersonBase("Bob").y2;
To get the size of a person's base.
var base = GetPersonBase("Bob");
var width = base.x2 - base.x1;
var height = base.y2 - base.y1;
[edit]
Notes
- Since the base of a person is the same as the base of that person's spriteset, the same results can be obtained as follows:
var base = GetPersonSpriteset("Bob").base;
[edit]
See also
- Sphere Spriteset object
- Sphere SpritesetBase object

