Discuss Scratch

teedletum
Scratcher
7 posts

When the green flag clicked- what can it do?

Most scripts start with
when green flag clicked

because the owner wants the script to automatically start.

What's “The Reason Why It Would Automatically Start”, eh? A little test.

Because that's what the block does?

Not quite.

Darn! I nearly had it.

So we can rule that suggestion out.

Because that's what the block does?

No. It's because there is a green flag button that you have to press before the project is shown to you.

Really?


Yup. So, this presses the green flag button.

It does?

Go try it.

Ok.

Your green flag is automatically pressed.

Wow.


Yes, wow.

What else can this Scratchblock do?

It can be used as a restart button as well.

How?

By creating a title screen backdrop, naming it titlescreen, then placing

switch backdrop to [titlescreen]

below

when green flag clicked

and this should give you a nice restart button. This can come in handy while you're making your project.

It can?

Yes, for situations such as testing games.

Should I always test my games?

Of course!

Why?

You might have a game that automatically makes you lose without you doing anything! I've done that before.

Funny!

I suppose it is kind of funny.

How do you make a game that lets you win or lose?

Tell you sometime.

When?

In another discussion.

But…

Not now.

If you want to find that out we'll talk later.

Fine.

Bye!

Bye, teedletum!

See you later.


Find out more in other discussions. If you have any complaints or have somehow taken offence during this discussion please contact teedletum in some way that you can find. Thank you for reading. This discussion is not real. It is simply a way of making this easier to understand and making it more all ages and less Boring- With- Long- Words.
Bellarina1012
Scratcher
26 posts

When the green flag clicked- what can it do?

It does this:
when green flag clicked
say [hi!]
click the green flag, and the sprite will say hi. that's what it does.
ProjectMaker59
Scratcher
500+ posts

When the green flag clicked- what can it do?

It does the stuff that you put when you click the green flag for example:
when green flag clicked
say [Hi!]

Last edited by ProjectMaker59 (May 8, 2016 17:17:12)

asivi
Scratcher
1000+ posts

When the green flag clicked- what can it do?

Bellarina1012 wrote:

It does this:
when green flag clicked
say [hi!]
click the green flag, and the sprite will say hi. that's what it does.

ProjectMaker59 wrote:

It does the stuff that you put when you click the green flag for example:
when green flag clicked
say [Hi!]

when green flag clicked
stop [all v]
rasmusolle
Scratcher
100+ posts

When the green flag clicked- what can it do?

Its a hat block that executes the script when the green flag is pressed



DONE
Nightseeker1
Scratcher
100+ posts

When the green flag clicked- what can it do?

it begins the scirpt by sensing that the green flag has been clicked
footsocktoe
Scratcher
1000+ posts

When the green flag clicked- what can it do?

The green flag is just a hat block like the rest of the hat blocks.

You can start your project by pressing any key and not having any green flag block in the script.

Last edited by footsocktoe (May 8, 2016 23:04:13)

CutAFoot
Scratcher
23 posts

When the green flag clicked- what can it do?

when green flag clicked
go to x: (0) y: (0)
forever
Move
end
define Move
if <key [ space] pressed?> then
change y by (10)
end

Last edited by CutAFoot (Feb. 24, 2019 15:42:26)

deck26
Scratcher
1000+ posts

When the green flag clicked- what can it do?

CutAFoot wrote:

when green flag clicked
go to x: (0) y: (0)
forever
Move
end
define Move
if <key [ space] pressed?> then
change y by (10)
end
Please don't blockspam or necropost.
sathvikrias
Scratcher
500+ posts

When the green flag clicked- what can it do?

like this:
when green flag clicked
. . . // this is just whatever you put under it
deck26
Scratcher
1000+ posts

When the green flag clicked- what can it do?

sathvikrias wrote:

like this:
when green flag clicked
. . . // this is just whatever you put under it
Please don't necropost.
gold0881
Scratcher
3 posts

When the green flag clicked- what can it do?

when green flag clicked
forever

define move
if <key [space v] pressed?> then
change y by (5)
end
end
example

Last edited by gold0881 (Nov. 2, 2020 15:58:39)

joshuaho
Scratcher
1000+ posts

When the green flag clicked- what can it do?

Hey folks - thanks for helping out! However, this topic is rather old (from 2016), so I doubt the topic owner is still looking for answers. I would suggest looking for newer topics that have not yet been answered and respond to those instead.

Powered by DjangoBB