Need help? Ask us anything! [CLOSED] [12/21/2020 - 1/8/2021]

Thank you wery much!!!

1 Like

Did it work?

1 Like

Chill question for the next Help Desk stream:

What consoles do you currently own? What consoles have you owned in the past? Playing any “old” games still?

2 Likes

@UnsignedArduino few things:

  1. You can test packages in the regular editor. Just switch to javascript, create a new file, paste your code into that file, return to blocks. Any blocks defined in any file that isn’t main.ts will show up in the toolbox
  2. On line 3, it should be Math.FastRandom
  3. For the randomElement function, you need to define it like this:
  randomElement(elements: any[]): any {
      return this._rng.pickRandom(elements)
  } 
  1. Instead of using % in your block definitions, use $. You can change all instances of %Random(rng) to be $this and then set the default variable name by adding another line like this:
   //% block="$this 50/50 chance"
   //% this.defl=rng
   randomBoolean() {
       return this._rng.randomBool()
   }

The reasons for using $ instead of % are kinda tough to explain, but just know that you are much less likely to accidentally break your extension in the future when changing code if you use $

  1. It’s usually recommended to add a //% blockId="extensionname_functionname" to your functions but totally optional
1 Like

@jacob_c haha i love that question! might take me more than one stream though…

1 Like

Yes!!! :slight_smile:

1 Like

Nice! How did it work though? What did you do so that it worked?

Hello! Is there any way I can use Python to make extensions for makecode arcade? I think that currently, makecode arcade only supports TS/JS to make extensions, but I am not very familiar with either, though I am working on learning them. I have a little bit more experience with python.

1 Like

I’m was copying the empty UF2 files :man_facepalming:

2 Likes

Oh… Well that explains a lot! Glad that I could help you!

We’ll be answering questions today on stream at 1PM PST! Tune in live if you want, but don’t worry if you can’t – we’ll post the video with links after :slight_smile:

2 Likes
  • What is your favorite/easiest thing to draw in Arcade? Hardest?
  • And when will you add flipping and rotating in the official image editor?
  • When is the next release coming? (Several weeks? Months? I’m just wondering)
2 Likes

And also, @system has a cake emoji - is today the forum anniversary?

1 Like

It automatically updates, the editor will say Download complete - reloading or something like that.

1 Like

THANKS EVERYBODY for your questions! The stream is posted here! Arcade Advanced Stream #180 - Help Desk!

2 Likes