Discuss Scratch

Rendangbike2
Scratcher
1000+ posts

What does the say block do?

I know what
say [this block does but]
why would we need it?
CatsUnited
Scratcher
1000+ posts

What does the say block do?

The say [] block is useful in that you can make a character say something until you instruct it to say something else, rather than waiting some amount of seconds for it to finish talking.

e.g. If you want to make a character talk while moving, this script:
say [hi lol] for (2) secs
repeat until <(x position) > [100]>
move (10) steps
end
would make the character say hi lol for 2 seconds, then move while this script:
say [hi lol]
repeat until <(x position) > [100]>
move (10) steps
end
say []
means that the character will still be saying “hi lol” while it's walking, then stop when it finishes.
Futurebot5
Scratcher
1000+ posts

What does the say block do?

The same reason as the
move () steps
block; beginner friendliness.
awesome-llama
Scratcher
1000+ posts

What does the say block do?

The say block is needed if you want to display text on screen in a simple way. That's it.

For more advanced projects, though, it's needed a lot less. However, I find it is extremely useful as a debugging tool. You can have sprites or even their clones constantly saying what they are doing, and with the complex things I do, I can always know why things happen.
For example, a recent car parking game I was making involved making cloned traffic with AI. I made a feature of those cars to not brake just when they are initially spawned (don't worry about the reason). To test it, I could make the cars use the say block, and output their own timer of when they are allowed to brake or not. It saves so much time.

Hearst10
Scratcher
100+ posts

What does the say block do?

Futurebot5 wrote:

The same reason as the
move () steps
block; beginner friendliness.
not exactly

Powered by DjangoBB