プレイ日記
Josiah Spike4
Does any body know how to make buttons work like this? i want to stop my repeat when i press the A button but I can't figure out how.
6そうだね
プレイ済み
返信[1]
親投稿
Javo Javo118
WHILE BT!=#A BT=BUTTON() WEND
0そうだね
未プレイ
返信[2]
親投稿
Josiah Spike4
Do you put anything in the parenthese?
0そうだね
プレイ済み
返信[3]
親投稿
Josiah Spike4
Never mind, the command worked. Thank you very much
0そうだね
プレイ済み
返信[4]
親投稿
Frood Volkanon
There are a couple of problems with Javo's example. First, it tests BT before setting it. Secondly, more than one button can be pressed, which would cause the test to fail since BT would not equal #A.
0そうだね
プレイ済み
返信[5]
親投稿
Frood Volkanon
The reason why my example tests for button release first is because I was running the program with the RUN command in direct mode (pressing "A" to enter the command) and the "A" button was still pressed when the program started (because SmileBASIC is so fast).
0そうだね
プレイ済み
返信[6]
親投稿
Josiah Spike4
Ok I will also take that into consideration. thanks
0そうだね
プレイ済み
返信[7]
親投稿
Javo Javo118
Thank you Frood, you're so right, my code have "holes" XD
0そうだね
未プレイ
返信[8]
親投稿
Javo Javo118
By the way, you can RUN with START button anywhere (even in edit mode)
0そうだね
未プレイ
返信[9]
親投稿
Frood Volkanon
I had my own program in slot 0 and the button testing program above in slot 1. As far as I know, the START button always runs the program in slot 0. So I was using the command RUN 1 in direct mode to start the button testing program. Sorry to complicate things with all that detail! 8D
0そうだね
プレイ済み