IsLayerReflective

From Spheriki

Jump to: navigation, search

Checks whether or not the given layer is reflective.


Contents

Usage

boolean IsLayerReflective(layer);
  • layer Number, non-negative. The index of the layer to check.
  • boolean Returns true if the layer is reflective, false otherwise.


Examples

This example should go in a script that runs while the map engine is running.

if (IsLayerReflective(0))
{
  // Do stuff for a reflective layer...
}

This checks if the absolute bottom layer of the current map has been set to be reflective, and runs some code if it is.


Notes

  • This function only works while the map engine is running.
  • The valid range of layers is between zero (0) and one less than the total number of layers on the map (GetNumLayers() - 1).
  • Reflective layers are special layers that reflect the persons on layers above them. Layers are numbered from lowest to highest, zero (0) being the bottom, so if layer zero is set to reflective, persons on layers starting from one (1) and going upwards will be reflected on layer zero (ed: needs verification).
  • For best results, use translucent tiles for reflective layers.


See also

Personal tools