Object-SpritesetBase

From Spheriki

Jump to: navigation, search

Describes the base collision box of a spriteset. It doesn't make much sense on its own, which is why it forms part of the Sphere Spriteset object.


Contents

Initializers

None. It comes in the form of the base property of the Spriteset object.


Methods

None.


Members

  • x1 Number, non-negative. X coordinate of the top-left corner of the base box, relative to the top-left corner of the sprite's image dimensions.
  • y1 Number, non-negative. Y coordinate of the top-left corner of the base box.
  • x2 Number, non-negative. X coordinate of the bottom-right corner of the base box.
  • y2 Number, non-negative. Y coordinate of the bottom-right corner of the base box.


Examples

See examples for GetPersonBase().


Notes

  • This box is set in the Sphere IDE's spriteset editor. Being a property of the spriteset itself, it remains constant for all frames of all animations in the spriteset.
  • The base of the spriteset determines how the sprite is drawn relative to its coordinates on the map in the map engine. The center of this box is placed precisely at the coordinates of the person on the map. Thus, this object can be used for precise positioning of a person, given their spriteset.


See also

Personal tools