Can't find "choose one of" block

Hi
I completed a tutorial that used the blocks. It was found in the arrays catagory.
However, this block is not available in a new project I have started.
Any idea?
Thanks

1 Like

I believe that is an extension.

2 Likes

Hmm, not sure why it’s called that in the tutorial. But the equivalent in the real workspace is the ā€œget random value from ā€¦ā€ block.

image

(It’s in arrays, in the read category)

4 Likes

Hi there! The choose one of block is what we call a ā€œmagic block,ā€ made just to simplify tutorials. If you’d like to use it in your project, you can copy the link from a project where you’re already using it and import that link as an extension.

Otherwise, @Sarge is right. It’s something that can be replicated by choosing a random image from an array.

3 Likes

Isn’t that the ā€œget random value from (list)ā€ block? It’s at the bottom of the ā€œreadā€ section in the arrays tab for me. You could always use
ā€œ(list) get value at ((length of array (list)) [-] (1)ā€

Any idea what the extension is called. I can’t see it. Thanks!

I’m not sure

That’s so interesting! I wonder if there is a way to get ā€œmagic blocksā€ from different tutorials into one project. Could be interesting idk.

Thanks everyone! I know I am way off with this setup but can someone please point me in the correct direction?
Error: Argument of type ā€˜Sprite’ is not assignable to parameter of type ā€˜Image’.
Property ā€˜drawIcon’ is missing in type ā€˜Sprite’.

I think the error is trying to tell you that you’re setting the projectile twice. The space where you have ā€œget random value from listā€ only needs an image. That means you only need to add the image of the hearts to your array, then you can call those in the next line.

(Basically, remove the ā€œsprite of kind [Projectile]ā€ from around the hearts.)

Hope that helps!

2 Likes

Thanks!
I think this must be close to the solution however there isn’t a way to just put the image in the array is there? I can’t sperate it from the sprite block.

Check Advanced->Images there’s a solo image block hanging out in there.

2 Likes