トピック
TrueHylian caindaddy

how do buttons work?

I'm new to the game and I'm trying to start a game. I understand PRINT, INPUT, LOCATE, WAIT, and CLS, but I don't understand anything else. Right now, I need to know how buttons work, so please try to help!
1そうだね
プレイ済み
返信[1]
親投稿
Autz sonic-HD8765
Buttons are read by using BUTTON() instruction. BUTTON returns what button is being pressed (aside from START and SELECT). I strongly recommend you three things: 1.- Toying around with the example program 2.- Read the instruction manual (http://smilebasic.com/en/reference/) 3.- Tap the "?" button on the touchscreen when you're writting a command to see more information and examples.
1そうだね
プレイ済み
返信[2]
親投稿
*J.P.* DEV NEWPICY3
so if you were to check the buttons it would go like this, IF BUTTON() AND #A THEN BEEP 5 here when used in a loop it will beep when pressing the A button, there are many things like #R and other stuff like that, you can use numbers specified in the button thingy (on help bar for button command) but personally i use #A or stuff like that. the () after button is useful, look at help tool 4 more
0そうだね
プレイ済み
返信[3]
親投稿
*J.P.* DEV NEWPICY3
a loop is what keeps the game from ending, a normal one goes like this WHILE 'begining WEND 'end so it goes from top to bottom over and over, see if this werent there the program would end right away. you would put the button stuff in there. another thing is VSYNC, it sets your programs speed and is very useful, without it you would zoom insanely fast through the program,it makes it good speed
0そうだね
プレイ済み
返信[4]
親投稿
*J.P.* DEV NEWPICY3
anyways i hope you understand that, or at least a little. hope i helped you in some minor way.
0そうだね
プレイ済み
返信[5]
親投稿
TrueHylian caindaddy
Thank man! That was very helpful! Now, how about SPSET?
0そうだね
プレイ済み