Computer Science Canada

I need help alternating code from 4.1 to 3.2, anyone help

Author:  w00t [ Thu Dec 16, 2004 7:20 pm ]
Post subject:  I need help alternating code from 4.1 to 3.2, anyone help

Hey,

I have my game working and i just tried to run it on an older version
(3.2) now my movement for my spaceship wont work because Input.KeyDown (KEY_DOWN_ARROW) etc doesn't exist.

Can anyone help me, i think getch is what to use but im not sure how to use it.

Author:  Paul [ Thu Dec 16, 2004 7:33 pm ]
Post subject: 

use getch and ord I think
here, use this to help you, run it and press the arrow keys
code:

var a: string(1)
loop
getch (a)
locate (1,1)put ord(a)
end loop

Author:  Tony [ Thu Dec 16, 2004 7:36 pm ]
Post subject: 

well
code:

var c : string (1)
loop
    if hasch then
        getch (c)
        put "character #", ord (c), " was pressed"
    else
        put "no input"
    end if
    delay (50)
end loop

Author:  w00t [ Thu Dec 16, 2004 7:43 pm ]
Post subject: 

thanks alot, i have it working again, well its rough but some fine tuning and SpacE Invaders will be back from the grave


: