I made this extension a while ago, and haven’t actually used it much. It handles simple button combinations, so you can attach events to sequences of buttons: https://github.com/jwunderl/pxt-button-combos
The extension adds some blocks to the controller section of the toolbox. To create a combination, you set an action to occur (like with other events) and define the combination using a string:
The values for the different buttons possible in the combo string:
You can also set it to require certain buttons be pressed at the same time by putting a “+” between them (for example, “a+b” in the snippet above)
In this example game, press the button sequences depicted on the tags before they move all the way across the screen to stay alive and gain points! (and remember that “+” between two buttons means you have to press the buttons at the same time!)
And here’s an alternate version with larger text if the previous one is hard to see:
The game on a console on YouTube. Thanks Joey for your work on this ! https://youtu.be/Vw3eiL0-YUs
I like the larger text. I tried to switch to blocks but Explorer gave me an error which will not allow switching…but only one error. As my usual approach to this, I just commented out the error line to see if that cleared things up. It did. Now I can switch your program to blocks so our kids can see how to make changes in the code that way. I don’t know how this method changes the outcome, but indeed it must.
Yeah, i noticed that error, i filed it on github and will try and fix it soon - its an issue with the decompilation of the sprite.data field. Commenting it out will make it so the blocks can theoretically allow duplicates of the same button sequence at the same time - this is fairly unlikely to happen, but can cause blocks to be impossible to destroy if it does occur.
I am trying to increase the sound of scoring points by adding set music volume to 100 but that does not seem to help. My hearing is not good at my age so I have to hold the Meowbit close to hear the sound on scoring. And Meowbit seems to have better volumn than BrainPad Arcade. Still testing. music set volumn to 2000 seems to improve it. Also , there are some annoying pop up screens when trying to download to console. This may not be known by the team as yet if they don’t have the hardware to install Arcade; the Adafruit window pops up every time and then the tab lower left which up arrow for “show in folder” disappears so I have to find the downloads folder and look for the program to be copied and pasted into console window.
Music should be on a scale of 0 - 255, so 100 will actually be a bit lower than the default. Have you tried it the beta editor? The sound should be better on hardware there, as there were some recent fixes
just tried BETA editor and set vol. at 255. That worked. Thanks ! I’ll do a video showing the annoying pop-ups and the hoops i have to jump through to download to console; tommorow or next day. Thanks again for all your work on this Joey.
Joey, I just loaded your game on Meowbit and BrainPad and connected them with jacdac 3.5mm stereo audio cable. The buttons on the Meowbit control the inputs on the BrainPad Arcade and score points on it ! Did you know this is possible? I did not change your code except for the add music volume. I see a popup asking to join the Meowbit to the Brainpad with suggestion to click A button if OK. I did and it works.
YES!!! Old-school unlock codes!!!
Now to figure out what up-up-down-down-left-right-left-right-B-A is going to do in my games…
In case you didnt notice, that is built in as the ‘special code’ block
So great! I love this extension. I did a MakeCode Minute on it:
You know, I think I have something WAY BETTER
2 PLAYER MODE