Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / button state

Author
Message
Sinistar99_2
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location:
Posted: 30th Sep 2011 20:14
My buttons stopped working. Suddenly getbuttonstate and getbuttonpressed no longer return anything. It's like the buttons no longer are recognized. Directions still work but not the 5 buttons.

Anybody else experiencing this problem?
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 30th Sep 2011 23:01
This is for a joystick, right?

Sinistar99_2
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location:
Posted: 30th Sep 2011 23:48
No the buttons involved in GetButtonPressed(1-5) aren't working.
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 1st Oct 2011 00:06 Edited at: 1st Oct 2011 00:24
Oh, I see.

I haven't used the virtual joystick buttons, just the regular virtual buttons. See the help here

http://www.appgamekit.com/documentation/Reference/Input/GetButtonPressed.htm

for the joystick buttons. Do you have a keyboard attached? Since I DO have a keyboard attached, GetButtonPressed() gets called by the spacebar for button 1, etc.

For example, this code:



shows that button number 1 is triggered by my spacebar.

I'm not near my iPad, so I can't test it with no joystick and no keyboard. Are you testing on a phone/tablet?

Are you using AddVirtualButton()? It works fine for me.

Sinistar99_2
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location:
Posted: 1st Oct 2011 02:36
I'm using it on windows now and the buttons (space, q,w,e,r,ctrl) aren't responding --they did at first and just recently quit working.

For example, the code:


do
a$ = str(getbuttonstate(1))+str(getbuttonstate(2))+str(getbuttonstate(3))+str(getbuttonstate(4))+str(getbuttonstate(5))
Print(a$)

Sync()
loop


shows all zeroes no matter what I press.
Sinistar99_2
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location:
Posted: 1st Oct 2011 20:31
For now I'm using getrawkeystate() as a work-around.
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 1st Oct 2011 21:25
Very strange. Your posted code works fine for me, each of the keys changes the appropriate zero to one.

Sinistar99_2
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location:
Posted: 1st Oct 2011 22:52
I wonder what's making my AppGameKit lose track of them...

Login to post a reply

Server time is: 2024-03-29 00:42:51
Your offset time is: 2024-03-29 00:42:51