Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 I need help alternating code from 4.1 to 3.2, anyone help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
w00t




PostPosted: 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.
Sponsor
Sponsor
Sponsor
sponsor
Paul




PostPosted: Thu Dec 16, 2004 7:33 pm   Post subject: (No 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
Tony




PostPosted: Thu Dec 16, 2004 7:36 pm   Post subject: (No 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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
w00t




PostPosted: Thu Dec 16, 2004 7:43 pm   Post subject: (No subject)

thanks alot, i have it working again, well its rough but some fine tuning and SpacE Invaders will be back from the grave
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: