
-----------------------------------
biggmak
Fri Mar 21, 2003 7:05 pm

~~!Moving Background!~~
-----------------------------------
im trying to make this game where this character walks around but i cant get the background to move over to the right by, let say five, so i set up an if statement for it and this is what i got...


var win : int := Window.Open ("fullscreen")
View.Set ("graphics:max;max")
var ruine : int := Pic.FileNew ("Ruine.bmp")
var u1 : int := Pic.FileNew ("u1.bmp")
var u2 : int := Pic.FileNew ("u2.bmp")
var u3 : int := Pic.FileNew ("u3.bmp")
var r1 : int := Pic.FileNew ("r1.bmp")
var r2 : int := Pic.FileNew ("r2.bmp")
var r3 : int := Pic.FileNew ("r3.bmp")
var l1 : int := Pic.FileNew ("l1.bmp")
var l2 : int := Pic.FileNew ("l2.bmp")
var l3 : int := Pic.FileNew ("l3.bmp")
var d1 : int := Pic.FileNew ("d1.bmp")
var d2 : int := Pic.FileNew ("d2.bmp")
var d3 : int := Pic.FileNew ("d3.bmp")

x := 400       %character
y := 250        %character
xruine := 0        %background
yruine := 0       %background

loop

    View.Update
    Input.KeyDown (chars)
    Pic.Draw (ruine, xruine, yruine, 0) %backround picture


    if chars (KEY_UP_ARROW) then

        y := y + 10
        Pic.Draw (u1, x, y, 0)

        delay (200)
        View.Update
        cls
        y := y + 10
        Pic.Draw (u2, x, y, 0)

        delay (200)
        View.Update
        cls
        y := y + 10
        Pic.Draw (u3, x, y, 0)

        delay (200)
        View.Update
        cls
        y := y + 10
        Pic.Draw (u2, x, y, 0)

        delay (200)
        View.Update
        cls

    end if
    if chars (KEY_RIGHT_ARROW) then
        cls
        x := x + 10
        Pic.Draw (r1, x, y, 0)
        View.Update
        delay (200)
        cls
        x := x + 10
        Pic.Draw (r2, x, y, 0)
        View.Update
        delay (200)
        cls
        x := x + 10
        Pic.Draw (r3, x, y, 0)
        View.Update
        delay (200)
        cls
        x := x + 10
        Pic.Draw (r2, x, y, 0)
        View.Update
        delay (200)
        cls

    end if
    if chars (KEY_LEFT_ARROW) then
        cls
        x := x - 10
        Pic.Draw (l1, x, y, 0)
        View.Update
        delay (200)
        cls
        x := x - 10
        Pic.Draw (l2, x, y, 0)
        View.Update
        delay (200)
        cls
        x := x - 10
        Pic.Draw (l3, x, y, 0)
        View.Update
        delay (200)
        cls
        x := x - 10
        Pic.Draw (l2, x, y, 0)
        View.Update
        delay (200)
        cls
    end if
    if chars (KEY_DOWN_ARROW) then
        cls
        y := y - 10
        Pic.Draw (d1, x, y, 0)
        View.Update
        delay (200)
        cls
        y := y - 10
        Pic.Draw (d2, x, y, 0)
        View.Update
        delay (200)
        cls
        y := y - 10
        Pic.Draw (d3, x, y, 0)
        View.Update
        delay (200)
        cls
        y := y - 10
        Pic.Draw (d2, x, y, 0)
        View.Update
        delay (200)
        cls
    end if
    delay (10)
    if x 