Hi all
When im using a joypad, i always find it helps if i can see what buttons do what, so i use this code, nothing special, but can be useful so i figured id post it here incase anyone wants help with how to use a joypad
Just plug in any joypad and press F5 and this will show you what the controls are
Sync On : Sync Rate 0
Set Display Mode 1024,768,32
Set Text Font "Courier New"
Set Text Size 10
` Activate a Joypad- Usually this is Control Device 1
Perform CheckList For Control Devices
Set Control Device CheckList String$(1)
Empty CheckList
make matrix 1,100,100,10,10
make object cube 1,10
Do
` Simple Control Camera
Move Camera 0,Joystick Up()-Joystick Down()
Turn Camera Left 0,Joystick Left()-Joystick Right()
set cursor 0,0
` Arrow Keys
Print "Joystick Up() = "+Str$(Joystick Up() )
Print "Joystick Down() = "+Str$(Joystick Down() )
Print "Joystick Left() = "+Str$(Joystick Left() )
Print "Joystick Right() = "+Str$(Joystick Right())
Print ""
` Hat
Print "Joystick X() ="+Str$(Joystick X())
print "Joystick Y() ="+Str$(Joystick Y())
print "Joystick Z() ="+Str$(Joystick Z())
Print ""
` Fire Buttons
Print "Joystick Fire A() = "+Str$(Joystick Fire A())
Print "Joystick Fire B() = "+Str$(Joystick Fire B())
Print "Joystick Fire C() = "+Str$(Joystick Fire C())
Print "Joystick Fire D() = "+Str$(Joystick Fire D())
For n = 0 to 32 : Print "Joystick Fire X("+Str$(n)+") = "+Str$(Joystick Fire X(n)) : Next n
Print ""
` Joystick Slider
print "Joystick Slider A() = "+Str$(Joystick Slider A())
print "Joystick Slider B() = "+Str$(Joystick Slider B())
print "Joystick Slider C() = "+Str$(Joystick Slider C())
print "Joystick Slider D() = "+Str$(Joystick Slider D())
Print ""
` Joystick Twist
print "Joystick Twist X = "+Str$(Joystick Twist X())
print "Joystick Twist Y = "+Str$(Joystick Twist Y())
print "Joystick Twist Z = "+Str$(Joystick Twist Z())
Print ""
` Joystick Hat Angle
print "Joystick Hat Angle(0) = "+Str$(Joystick Hat Angle(0))
print "Joystick Hat Angle(1) = "+Str$(Joystick Hat Angle(1))
print "Joystick Hat Angle(2) = "+Str$(Joystick Hat Angle(2))
print "Joystick Hat Angle(3) = "+Str$(Joystick Hat Angle(3))
Print ""
Sync : Loop