Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2018-05-03 17:55:52

jobalisk
Member
From: I don't even know anymore...
Registered: 2017-05-28
Posts: 55
Website

checking for a key that is depressed.

Hey all,
Just a quick question, so I know you can use waitpadup(); to wait for all buttons to be up, but how do you test if say A and only A has been depressed?

thanks

Offline

 

#2 2018-05-03 20:41:34

gbjosh
Member
From: KY
Registered: 2016-06-15
Posts: 30

Re: checking for a key that is depressed.

Whoops misread your question. You can check the joypad() status to make sure it is not equal to J_A.

Last edited by gbjosh (2018-05-03 21:24:54)

Offline

 

#3 2018-05-04 16:30:05

jobalisk
Member
From: I don't even know anymore...
Registered: 2017-05-28
Posts: 55
Website

Re: checking for a key that is depressed.

wow, that's so obvious...

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson