SetLayerReflective

From Spheriki

Jump to: navigation, search

Sets whether the layer should be reflective.


Contents

Usage

SetLayerReflective(layer, reflective);
  • layer Number, non-negative. The index of the layer to set the reflectiveness of.
  • reflective Boolean. Use true to set the layer to reflect, false to make it not reflect.


Example

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

SetLayerReflective(0, !IsLayerReflective(0));

This will make the bottom layer reflective if it wasn't already, and will make it non-reflective if it was.


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 this same layer. Tiles that have an alpha value of 255 are not reflective. To be able to be reflective, the tile must have some alpha translucency. Transparent tiles (alpha is zero) will reflect 100%. Note that a translucent tile will also show the tile on the layer below. So to make reflective water, put a water tile on layer 0, then make layer 1 reflective and put some translucent tiles on it. Set the entry point to be on layer 1.
  • Layers are numbered from lowest to highest, zero (0) being the bottom.
  • For best results, use translucent tiles for reflective layers.

See also

Personal tools