
-----------------------------------
w00t
Thu Dec 16, 2004 3:25 pm

Setting Boundaries for Key inputs
-----------------------------------
    
        loop

        Input.KeyDown (chars)

        if chars (KEY_RIGHT_ARROW) then
            x := x + 2
        end if
        if chars (KEY_LEFT_ARROW) then
            x := x - 2
        end if
        if chars (KEY_DOWN_ARROW) then
        end if
        Pic.Draw (ship, x, 10, picCopy)
        View.Update
    end loop

this is what i have for key inputs so far i was wondering if there is a way to set boundaries so that an object doesn't go to far off the screen?!? Becuase that would be bad in a game like space invaders!

Any help is greatly appreciated..
w00t

and yes i realized i just posted a topic about key inputs like 15 mins ago.. please over look that

-----------------------------------
wtd
Thu Dec 16, 2004 3:30 pm


-----------------------------------
if chars (KEY_RIGHT_ARROW) then
   x := x + 2
end if

Use something like:

if chars (KEY_RIGHT_ARROW) and x 