SetCameraX
From Spheriki
Sets the X position of the camera when the map engine is open and the camera isn't attached to a person.
Contents |
[edit]
Usage
function SetCameraX(xpos);
- xpos The x position in pixels to set the camera to.
[edit]
Examples
SetCameraX(10 * GetTileWidth());
Sets the camera's x to the 10th tile.
if (GetCameraX() <= 300) SetCameraX(GetCameraX() + 1);
When set as a render script or delay script, this scrolls the camera to the right until it reached the destination of 300 pixels.
[edit]
Notes
Note that the camera's position is aligned in the center. When setting the camera's x to 500, it will CENTER the screen to x pixel 500.
[edit]
See also
- GetCameraX()
- SetCameraY()
- GetCameraY()

