Discuss Scratch

JavaApple
Scratcher
27 posts

If green flag clicked...

I need to make a if green flag clicked button… If you're thinking there's already one, the WHEN green flag clicked button, that's not what i'm talking about. I need it so i cant put it in the forever loop. Here's how the code looks like:

when green flag clicked
forever
if green flag clicked
end

I need it because my script always starts when the green flag is clicked. How can I fix this. I need it to start when it recieves a broadcast, not when the green flag is pressed. project here: https://scratch.mit.edu/projects/387246476

Last edited by JavaApple (April 24, 2020 21:11:36)

Oumuamua
Scratcher
1000+ posts

If green flag clicked...

OK, you create a sprite called “green flag” and make it show on screen, then

when this sprite clicked
broadcast [ v]
JavaApple
Scratcher
27 posts

If green flag clicked...

?
Oumuamua
Scratcher
1000+ posts

If green flag clicked...

JavaApple wrote:

I need to make a if green flag clicked button… If you're thinking there's already one, the WHEN green flag clicked button, that's not what i'm talking about. I need it so i cant put it in the forever loop. Here's how the code looks like:

when green flag clicked
forever
if green flag clicked
end

I need it because my script always starts when the green flag is clicked. How can I fix this. I need it to start when it recieves a broadcast, not when the green flag is pressed. project here: https://scratch.mit.edu/projects/387246476

Why to put scripts under the true green flag block when you don´t want to run any?
You just don´t, you make show the sprite i said and save the project.
The user who wants to play your project all that will see is your sprite and nothing will happen unless they click on it.

That if i don´t missunderstood you.
FoofJr
Scratcher
100+ posts

If green flag clicked...

JavaApple wrote:

I need to make a if green flag clicked button… If you're thinking there's already one, the WHEN green flag clicked button, that's not what i'm talking about. I need it so i cant put it in the forever loop. Here's how the code looks like:

when green flag clicked
forever
if green flag clicked
end

I need it because my script always starts when the green flag is clicked. How can I fix this. I need it to start when it recieves a broadcast, not when the green flag is pressed. project here: https://scratch.mit.edu/projects/387246476

Oumuamua wrote:

OK, you create a sprite called “green flag” and make it show on screen, then

when this sprite clicked
broadcast [ v]

JavaApple wrote:

?
What he's saying go to the sprite library with the prefab costumes, search green flag, and add it. Then add this script
when this sprite clicked
broadcast [greenflag]
Then, you would just change things to start when the recieve that broadcast. Not sure why you want this to happen though.
JavaApple
Scratcher
27 posts

If green flag clicked...

I want it to show after the animation/video has started to play…
SpideyPlaysMC
Scratcher
500+ posts

If green flag clicked...

Basically, just make a broadcast called “green flag” or something.
JavaApple
Scratcher
27 posts

If green flag clicked...

Let me try that out…
JavaApple
Scratcher
27 posts

If green flag clicked...

How do i apply this to pen extension?
Oumuamua
Scratcher
1000+ posts

If green flag clicked...

JavaApple wrote:

I want it to show after the animation/video has started to play…

Oh! a new condition you never said before…

Powered by DjangoBB