Scratch 3 block help (Part 1)

Thanks a lot guys.
And the last question how to apply library that to be added in the import libraries?

And another thing is that how to make <[message 1 v] received?> block?

Hi @sairam,
Trying to answer some of the questions...

  • If you have some collections of custom blocks, you can export them (Export blocks option). You will get an xml file with these blocks. And you can import them wherever you want (importing will upload these blocks without restarting your project).
  • To help your students, you can also store empty projects with these blocks (and maybe you can add some other customization: hide some primitives, add some comments into the scripting area...). Sharing these projects, you will get a simple URL for your students, and they will get quickly the starting point you are proposing.
  • You can also suggest (in this forum) adding a library to the official repo. But this is a design decision... and it will be only a request to be valued.

And sorry, I don't understand what do you mean with " <[message 1 v] received?>". I don't see this block anywhere.

Joan

Oops!

I see (and answer) the last question (about "message receiving") on other thread!

Please, help us to put order in discussions and not repeat questions in different places.

Continue...
Joan

I did the that fully but any message received is my problem. So please help on this.
Or create a js code for this.???

init
when
pred
When you're finished processing a message you'll want to remove it from the list.

But you could make 5 blocks and use that.

You could try my code.
My code is that the
If (message) = (message) or (message) = [any thing] then
Report true
Else
Report false

Oh @sairam1235,

But this is not the same. If you only want if the current message is not empty... You only need
messageReceived

Joan

No this code reports false
If (message) = [any message] then
Report true
Else
Report false

I used the special menu message menu.

can you explain?

I don't understand what you want.

Yes this predicate reports false when no message was received, and true when "any message" was broadcasted.

The issue is that the MESSAGE reporter reports the most recent broadcast message. If two different messages happen in quick succession you might miss one of them. That's why, if you're really serious about not losing a message, you have to keep a list of them.

The special menu of message consists of any message and other messages.
But when I use any message option
It reports false but it should report true.

the question to me is, what to you hope to achieve with the "message received" block. If you want to use that - as I suspect - to escape from a loop, think again.

Sorry I can't understand this.

what are you trying to accomplish? Is it something like this?

Untitled%20script%20pic%20(9)

Yes! It is like that.

Hi @sairam1235 ,

Different options... maybe the clearer one is using a variable. We don't need to store all the messages (like a messages log). Then, the message is the event, an the variable is the state.
gameOver

Of course, you don't need here a message, because "when space key pressed" can fire the variable change, and that is the event... but in this example, the change of "gave over" variable is fired by "game over" message. And then, we can "broadcast this message" in different parts of the project.

Joan

But can you make it as a single block