Discussions

SmileBASIC Community

Erryestherrose123

07/27/2016 12:04 PM ·Spoilers

Open Closed

Press A to start!

Another noob question... How do i write something like"if button==#A then goto@start"?

Advertisement

Comment

This post has no comments.

  • try doing this IF BUTTON(2)==#A THEN GOTO @START

    Yeahs0
    Played
  • it should look like this

    Yeahs0
    Played
  • you don't need line 5 and 6 that was just my test code

    Yeahs0
    Played
  • Does the (2) have to be there? I tried just () and it didn't work?

    Yeahs0
    Played
  • the (2) is called a feature ID look in the screenshot

    Yeahs0
    Played
  • 0 means if you hold the button down is does somthing

    Yeahs0
    Played
  • 3 means when you release the button it does somthing

    Yeahs0
    Played
  • something*

    Yeahs0
    Played
  • actually this should work

    Yeahs0
    Played
  • Here's what you should do instead. REPEAT VSYNC 1 UNTIL (BUTTON(2) AND 16)!=0 This way, you don't even need to call labels. You can just put your game's code below the code I just gave you and it will work. "(BUTTON(2) AND 16)!=0" is better than just "BUTTON(2)==16", because if you press, for example, A and L at the same time, the latter code won't detect the A press. :P

    Yeahs1
    Played
  • Thank you!

    Yeahs0
    Played

Add a Comment

You must sign in to post a comment.

Sign in using a Nintendo Network ID to connect to users around the world by writing posts and comments and by giving Yeahs to other people's posts. You can create a Nintendo Network ID using your Wii U console or your system in the Nintendo 3DS family.

Use of Miiverse Details about Miiverse

Report Violation to Miiverse Administrators

You are about to report a post with content which violates the Miiverse Code of Conduct. This report will be sent to Nintendo's Miiverse administrators and not to the creator of the post.

Violation Type:

Post ID: 3DB-NBL7-EJ9-9E2A-D2T-R27U

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: