GetPersonSpriteset

From Spheriki

Jump to: navigation, search

Get the spriteset associated with a person.


Contents

Usage

Spriteset GetPersonSpriteset(person_name);
  • person_name string. The name of the person to get the spriteset of.
  • Spriteset is returned, which is a clone of the spriteset of the named person.


Examples

Here, we will take the spriteset of a person, modify it, and then assign it back to the person:

var ss = GetPersonSpriteset("Tim");
ss.directions[0].frames[0].index = 1;  // set 1st frame of 1st dir to 2nd image
SetPersonSpriteset("Tim", ss);


Notes

  • Since the returned spriteset is a clone, you need to give the spriteset back to the person if you want the changes to be seen.


See also

Personal tools