プレイ日記
Please, help me with the ups and downs of this language...
0そうだね
プレイ済み
返信[1]
親投稿
Clayton DarkClay88
Let's start with the basics. PRINT - Prints whatever you want on the screen. (ex. PRINT "Hello World!") The word you want to print has to be in quotations! LOCATE X,Y - Moves your print. (ex. LOCATE 10,15 PRINT "Hello World!") WAIT - Waits an amount of time to go to the next line. (ex. WAIT 200) ACLS - Clears the whole screen. CLS - Clears just the text.
1そうだね
プレイ済み
返信[2]
親投稿
Clayton DarkClay88
GCLS - Clears just the graphics on the screen.
1そうだね
プレイ済み
返信[3]
親投稿
Clayton DarkClay88
BGMPLAY 0-??? - Plays BGM. (ex. BGMPLAY 5) Click the smile button on the bottom of the keyboard to see the different BGM. BEEP 0-??? - Makes a noise (ex. BEEP 24) In the smile tool as well. Labels - Labels a line so you can GOTO it by using GOTO @(Whatever label you chose) (ex. @LOOP) ' - Having an apostrophe before a sentence makes it so it won't affect the program. (ex. 'Walking Code↓)
1そうだね
プレイ済み
返信[4]
親投稿
Clayton DarkClay88
Last and not least, button inputs. BUTTON() - Makes it so when you press the assigned button it does something, usually with an "If then" statement. (ex. IF BUTTON() AND #A THEN 'etc.)
1そうだね
プレイ済み
返信[5]
親投稿
Clayton DarkClay88
So let's make a program with what we learned. ACLS 'Clears the screen LOCATE 5,5 PRINT "Press A, B, Y, or X to make a sound" BGMPLAY 0 @LOOP IF BUTTON() AND #A THEN BEEP 0 IF BUTTON() AND #B THEN BEEP 1 IF BUTTON() AND #Y THEN BEEP 2 IF BUTTON() AND #X THEN BEEP 3 GOTO @LOOP 'Goes back to the label "@Loop"
1そうだね
プレイ済み
返信[6]
親投稿
PChicken NerdChicken
dear lord please don't use goto for loops Use WHILE/WEND or REPEAT/UNTIL loops. WHILE <CONDITION> <CODE> WEND REPEAT <CODE> UNTIL <CONDITION>
1そうだね
プレイ済み
返信[7]
親投稿
PChicken NerdChicken
Or, in special cases, use FOR/NEXT loops. FOR X=<INITIAL NUMBER> TO <END NUMBER> <CODE> NEXT
1そうだね
プレイ済み
返信[8]
親投稿
Clayton DarkClay88
I'm just using GOTOs because it's better for beginners.
1そうだね
プレイ済み