SetCameraY

From Spheriki

Jump to: navigation, search

Sets the Y position of the camera when the map engine is open and the camera isn't attached to a person.


Contents

Usage

SetCameraY(ypos);
  • ypos The y position in pixels to set the camera to.


Examples

SetCameraY(10 * GetTileHeight());

Sets the camera's y to the 10th tile.

if (GetCameraY() <= 300) SetCameraY(GetCameraY() + 1);

When set as a render script or delay script, this scrolls the camera downwards until it reaches the destination of 300 pixels.


Notes

Note that the camera's position is aligned in the center. When setting the camera's y to 500, it will CENTER the screen to y pixel 500.


See also

Personal tools