Computer Science Canada Joystick |
Author: | Mikez [ Tue Dec 10, 2002 8:37 pm ] |
Post subject: | Joystick |
What are the commands/sytaxes for using a joystick for turing ASAP |
Author: | Tony [ Tue Dec 10, 2002 9:41 pm ] |
Post subject: | |
Joystick.GetInfo(joystick:int, var xPos, yPos :int. btn1Pressed, btn2Pressed:boolean) Note that position of joystick is not the same ratio as screen, so you should use screeX = round(maxx*(xPos-joyMin)/(joyMax - joyMin)) screeY = round(maxy*(yPos-joyMin)/(joyMax - joyMin)) Enjoy, and happy game making |
Author: | Mikez [ Sat Dec 14, 2002 9:38 pm ] |
Post subject: | |
can u give an example of the Joystick.GetInfo command cause i don't understand completly thanx and sorry to bother u |
Author: | Dan [ Sat Dec 14, 2002 10:01 pm ] | ||
Post subject: | |||
that will give you a costant print out of where the joy sticks x and y is and if it's butions are pushed down. you coude add locate stuff and daylys to this code to make it more readable. |
Author: | hexx [ Sun Dec 15, 2002 3:10 pm ] |
Post subject: | |
var x, y :int var b1, b2 :boolean loop locate (1,1) Joystick.GetInfo(1, x, y, b1, b2) put "x: ", x put "y: ", y put "b1: ", b1 put "b2: ", b2 put "" put "" end loop here ya go |