SetLayerWidth
From Spheriki
Set the width of a layer. Sizes are in tiles, not pixels.
Contents |
Usage
- layer identifies the layer number.
- width sets the width of the selected layer.
Examples
Set the layer width of the bottom-most layer to 20 tiles (exactly 320 pixels if your tile size is 16x16).
SetLayerWidth(0, 20);
Expand the width of the bottom-most layer by 1 tile.
SetLayerWidth(0, GetLayerWidth(0) + 1);
Notes
Only the width 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
- GetLayerWidth(layer)
- GetLayerHeight(layer)
- SetLayerHeight(layer, height)