Posted: Sat Jun 18, 2011 12:01 pm Post subject: Need help for my joystick!
I have made a game for my joystick but i made it accordingly to the keyboard! I need help on how to make it work with my joystick! Can anyone help me with this please!
I will be very grateful if anyone helped!
const val : int := parallelget % Read in the set of pin values
put "Pin 10 is: ", (val div 64) mod 2
put "Pin 11 is: ", (val div 128) mod 2
put "Pin 12 is: ", (val div 32) mod 2
put "Pin 13 is: ", (val div 16) mod 2
put "Pin 15 is: ", (val div 8) mod 2
I need this code put in my game! which helps it work on my joystick but currently i have this which works with my keyboard!
f hasch then
getch (z)
if z = "w" then
b := 1
a := 0
Scoring := 5
elsif z = "s" then
b := -1
a := 0
Scoring := 5
elsif z = "a" then
b := 0
a := -1
Scoring := 5
elsif z = "d" then
b := 0
a := 1
Scoring := 5
end if
z := ""
end if
Sponsor Sponsor
Insectoid
Posted: Sat Jun 18, 2011 12:22 pm Post subject: RE:Need help for my joystick!
I'm pretty sure you need a parallel joystick to do this, and just use parallelget to retrieve the state of the joystick.