Scroll2

Last Modified: 1/17/2021

Scrolls the active background plane to an absolute position. The points where the absolute position is calculated from is (0,0).

Arguments

NameTypeRequiredDescription
Direction System Identifier Yes The direction to shift the active background plane.
Quantity Integer Yes The amount to shift the plane in pixels.
Cell Integer No Required if the scroll mode is HScroll_Cell, HScroll_Line, or VScroll_2Cell.

Scroll Directions

DirectionDescription
Up Set the direction to shift the plane Up.
Down Set the direction to shift the plane Down.
Left Set the direction to shift the plane Left.
Right Set the direction to shift the plane Right.

Example

Syntax: Scroll <Direction>, <Quantity> [,<Cell>]
    DrawTile 1,0,0
    Sleep 60
    Scroll2 Down, 10
    Sleep 60
    Scroll2 Up, 6

Remarks

You can change the active scroll plane using the SetScrollPlane.

If you're using HScroll_Cell, HScroll_Line, or VScroll_2Cell and omit the Cell value, it will default to 0.

See Also

Scroll, SetGfxPlane, SetScrollMode, SetScrollPlane