GetViewportY ()
Returns the Y-offset of the current viewport in a scrolling room. This
allows you to find out what part of the room the player is looking at.
The co-ordinate returned is the top edge of the screen, and so it can
have a value between 0 and (ROOM HEIGHT - 200).
If the room is a non-scrolling room, returns 0.
Example:
if (GetViewportY()>20)
object[2].Visible = true;
will turn object 2 on if the player has scrolled the room by 20 pixels to the bottom.
See Also: GetViewportX, SetViewport
|