How do people do buttons?

I’ve played a few games on the forum, and they all seem to use the same method of buttons. Is there some extension that does it, or am I missing something, or do I just need to program it myself?

3 Likes

Hello SoapMimic,

Do you mean the buttons :up_arrow::left_arrow::right_arrow::down_arrow::a_button_blood_type::b_button_blood_type: (A and B are spacebar and enter respectively on keyboard)?

Just use the ‘Controller’ blocks; they are the second from the top and are red.
The three in the picture are very easy to use for simple movement…

<move (mySprite) with buttons vx() vy() is the easiest to implement; as it is when you drag it out, your sprite will move in all four directions using arrow keys. Click the plus on the end to expand, and the numbers you type in change the speed (default is 100, no movement is 0),
<on [A] button pressed> is good for when you’re trying to do a simple detection of a button and then have something happen, and
<is [A] button pressed> can be used for slightly more complicated logic.

There are also others, many of which are quite useful for making 2-player games.

Finally, there are plenty of extensions that let you use more buttons on the keyboard, but this isn’t necessary for most games.

Sorry if I misinterpreted your question, but there’s an answer anyway, from @dogSquid (yes i just pinged myself) :waving_hand:

2 Likes

@SoapMimic If you’re wondering how people change the A and B buttons to something else, there is the keybinds extension by @Brohann here. It lets you change the keys for each button, for example you can change the A button to the C key.
There’s also the Browser Events extension (found in the main extensions catalog) that will let you check for any key pressed, allowing more than the simple up down left right A B buttons.
Hope this helps!

2 Likes