DAY 1 OF USING SMILE BASIC 4 (Switch)
I've implimented movement.
'---------------------------------------------------------------------' ' MOVEMENT' CLS DX=185,DY=115 SPSET 0,0:SPOFS 0,DX,DY LOOP IF BUTTON(1,#B_LLEFT)==1 THEN DX=DX-1 IF BUTTON(1,#B_LRIGHT)==1 THEN DX=DX+1 IF BUTTON(1,#B_LUP)==1 THEN DY=DY-1 IF BUTTON(1,#B_LDOWN)==1 THEN DY=DY+1 IF DX>360 THEN DX=360 IF DX<0 THEN DX=0 IF DY<0 THEN DY=0 IF DY>220 THEN DY=220 SPOFS 0,DX,DY VSYNC ENDLOOP '---------------------------------------------------------------------'It sets the sprite of a strawberry in the middle of the screen (roughly 185 (direction X) and 115 (direction Y)) and using the joy-con's right directional buttons, I can move the strawberry around the screen which will then stop if it reaches the certain threshold. (see DX,DY) However, If I say want to add right below it (I have it marked out to make it easier to see what's what) like a beep function for the A button like so:
'---------------------------------------------------------------------' ' MOVEMENT' CLS DX=185,DY=115 SPSET 0,0:SPOFS 0,DX,DY LOOP IF BUTTON(1,#B_LLEFT)==1 THEN DX=DX-1 IF BUTTON(1,#B_LRIGHT)==1 THEN DX=DX+1 IF BUTTON(1,#B_LUP)==1 THEN DY=DY-1 IF BUTTON(1,#B_LDOWN)==1 THEN DY=DY+1 IF DX>360 THEN DX=360 IF DX<0 THEN DX=0 IF DY<0 THEN DY=0 IF DY>220 THEN DY=220 SPOFS 0,DX,DY VSYNC ENDLOOP '---------------------------------------------------------------------' LOOP IF BUTTON(1,B_A,1) THEN BEEP 6 ENDLOOPNothing happens... All the code works just fine (no errors) it's just when I try to press the A button to get it to beep, nothing happens. I would really love some help.