joy.button[]
Displaying 1-5 of 5 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Ness

I'm trying to unpress a joystick button without using the b1, b2, b3 keys. Problem is when I put 'joy.button[0] = 0;' verge gives me a Unknown HVAR1 error. Is the joy.button array read only?

Posted on 2005-01-15 14:42:20

RageCage

It would appear so, but why would you need to?
No one should be using joy sticks anyway ^_-

Posted on 2005-01-16 10:41:08

Omni

Maybe you should write your own joystick input wrapper.


Psuedo-code
void UnpressJoy()

must_unpress = 1


void GetButton()
if must_unpress = 1
if button_pressed
return 0
if button_pressed = 0
must_unpress = 0
return 0
if button_pressed
return 1
if button_pressed = 0
return 0




Something like that. That way you don't ever have to really alter the Joystick variable, just check if the button is pressed, and then set your own unpress variable.

Posted on 2005-01-16 11:35:41 (last edited on 2005-01-16 11:36:12)

mcgrue

I have a little keyboard/joystick interface library that's in need of some spit and polish that does precisely this.

Wooly's War of Fire demo used a specialized version of the lib that I custom tailored in a rush (mainly because I wanted to play it on my SNES controller).

Posted on 2005-02-09 14:57:45

Ness

Actually I took Omni's idea and ran with it. (Nerdy Aura) I can check the value of a keyboard buton and a joystick button at the same time using a single define!

I did all this because the style of game I'm making tends to need more then 4 buttons, and I wanted to play on my PSX pad.

Posted on 2005-02-09 15:30:04


Displaying 1-5 of 5 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.