GetPersonMask

From Spheriki

Jump to: navigation, search

Get the color tinting mask of a person.


Contents

Usage

Color GetPersonMask(name);
  • person String. The name of the person to get the mask from.
  • Color is returned, which is a Sphere Color object representing the tinting mask.


Examples

CreatePerson("Willy", "your_spriteset.rss", false);
SetPersonMask("Willy", CreateColor(0, 255, 0, 255));
// ...
var c = GetPersonMask("Willy");
Abort("mask: red=" + c.red
    + " green=" + c.green
    + " blue=" + c.blue
    + " alpha=" + c.alpha + "\n");

The above code sample will create a person named "Willy", and then give Willy a mask of green. The mask is then retrieved and displayed on the screen.


Notes

  • The results of this function are only defined when SetPersonMask() has been called beforehand.
  • To set the tinting color mask of a person, use SetPersonMask().


See also

Personal tools