

-----------------------------------

Rasta Fella

Mon Jan 16, 2006 9:29 pm


Help With Collision,

-----------------------------------

Well, yeah for my summative I'm making a obstacle type game. I'm not very fluent with the getch/hasch so looked for another alternative. Now I'm doing this movement using Input.Keydown and so what I do is so far all my obstacles have been boxes. So I my commands are like if x,y are in the box cordinate then reset from begining and count as death. Fairly simple, but now the problem is that is it possible to circles without changing my code to hash/getch or without using what dotcolour? Im thinking of doing like timed gates kind of thing that open and close but cant figure out a code.

This is a code for one of my levels, it won't work because i kind of copied and pasted from different places in my code. An because it is my summative....but I will post it after summatives.

Oh yeah...and its my first year in turing so.... i think you get the message.

proc movedot
Input.KeyDown (chars)
    if chars (KEY_UP_ARROW) then
        if y = 337 then
            boom_death_reset            
            x := 20
            y := 60
            tdeaths:= tdeaths +1
            ldeaths:= ldeaths +1   
        end if
    end if
    if chars (KEY_RIGHT_ARROW) then
        if x = 547 then
            boom_death_reset
            x := 20
            y := 60
            tdeaths:= tdeaths +1
            ldeaths:= ldeaths +1 
        end if
    end if
    if chars (KEY_LEFT_ARROW) then
        if x >= 13 then
            x := x - 1
        elsif x = 53 then
            y := y - 1
        elsif y= 50 and y = 75 and x = 50 and y = 275 and x = 50 and y = 475 and x = 90 and y = 175 and x = 90 and y = 375 and x = 320 and y = 530 and x 