SetPersonMask
From Spheriki
Set color channel "multipliers" to use for drawing a person.
Contents |
Usage
- name String. The name of the person to change the color mask of.
- color Sphere Color object. The color mask to set, where each channel varies from 0 (blot out channel) to 255 (show channel at full intensity.) See notes.
Examples
If the mask color has RGBA values of (255, 0, 0, 255), only the red elements of the sprite are drawn. Eg.:
SetPersonMask("Terri", CreateColor(255, 0, 0, 255));
The above code sample will cause the person named "Terri" to appear only in shades of red.
If the color is RGBA:(255, 255, 255, 128), the sprite is drawn at half transparency. Eg.:
SetPersonMask("Sherry", CreateColor(255, 255, 255, 128));
The above code sample will cause the person named "Sherry" to appear translucent, like a ghost.
Notes
- This function uses the shaping/multiplying form of color masking. The mask is used to "shape" the original colours, making it possible to blot out colors partially or entirely.
- To grab the color mask being used for a person, use the GetPersonMask() function.
See also
- Color masking
- Sphere Color object