プレイ日記
Bean wolfcool360
Can someone give me a working example of the BUTTON command? Sorry I'm asking so many questions, I'm just really terrible at this.
6そうだね
プレイ済み
返信[1]
親投稿
Mike Bluerobin2
@LOOP IF (BUTTON() AND #A) THEN PRINT "A BUTTON PRESSED!" GOTO @LOOP
1そうだね
プレイ済み
返信[2]
親投稿
There are different variables for buttons. Up-1 Down-2 Left-4 Right-8 A-16 B-32 X-64 Y-128 L-256 R-512. For example, @BUTTON IF BUTTON()==16 THEN GOTO @A GOTO @BUTTON @A PRINT "YOU PRESSED A!"
1そうだね
プレイ済み
返信[3]
親投稿
Don Trump pirateseph2
the BUTTON() function returns the status of the hardware buttons There are also contants set for this, so you can od it like Mike posted above #UP &H0001 #DOWN &H0002 #LEFT &H0004 #RIGHT &H0008 #A &H0010 #B &H0020 #X &H0040 #Y &H0080 #L &H0100 #R &H0200 #ZL &H0800 #ZR &H1000
1そうだね
プレイ済み