SetLayerHeight

From Spheriki

Jump to: navigation, search

Set the height of a layer. Sizes are in tiles, not pixels.


Contents

Usage

void SetLayerHeight(layer, height);
  • layer identifies the layer number.
  • height sets the height of the selected layer.


Examples

Set the layer height of the bottom-most layer to 15 tiles (exactly 240 pixels if your tile size is 16x16).

SetLayerHeight(0, 15);

Expand the height of the bottom-most layer by 1 tile.

SetLayerHeight(0, GetLayerHeight(0) + 1);


Notes

Only the height of the current layer is changed. All other layers stay at their old sizes, so if you want to resize the entire map you will have to resize all layers (unless it's a smaller parallax layer). If you don't, the map will likely end up looking screwed up outside the original area.

If your person is outside the map after resizing and you have tile specific code running, it is likely that Sphere will quit with an error message. Make sure you resize only when appropiate.


See also

Personal tools