SetColorMask

From Spheriki

Jump to: navigation, search

Covers the map in a color for a certain amount of time.


Contents

Usage

SetColorMask(color, num_frames);
  • color Sphere Color object. The color mask to use.
  • num_frames number. Number of frames for the map engine to continue to apply the mask.


Examples

This will make it so that the next 5 seconds in the map engine will be tinted with dark grey:

var grey = CreateColor(96, 96, 96, 128);
SetColorMask(grey, 5 * GetMapEngineFrameRate());


Notes

  • This only has an effect if the map engine is running.
  • It's recommended that you use an alpha other than 255, e.g. in the code above, it is only 128. This lets you see the map through the color tint.
  • For a map engine called like MapEngine("bleh.rmp", 60);, having num_frames = 60 means 1 second of masking, 120 means 2 seconds, etc.


See also

Personal tools