This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-05-29 11:29:19

emboar30
Scratcher
Registered: 2011-05-03
Posts: 100+

Double green flag

On my project dirt racer v1.1, it comes up with the win screen when you click play. However, if you press the green flag again it works. Can anyone help?


http://scratch.mit.edu/static/icons/buddy/788987_med.png?t=2011-05-02+15%3A14%3A41
I is epiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiic!     See my stuff here!!!!!

Offline

 

#2 2011-05-29 12:16:23

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Double green flag

I'm not exactly sure what causes this, but I have noticed that projects have a tendency to do this. Have you ensured that absolutely everything (sprites, backgrounds, variables, etc) is set to reset completely upon pressing the green flag?


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2011-06-03 09:43:09

emboar30
Scratcher
Registered: 2011-05-03
Posts: 100+

Re: Double green flag

Harakou wrote:

I'm not exactly sure what causes this, but I have noticed that projects have a tendency to do this. Have you ensured that absolutely everything (sprites, backgrounds, variables, etc) is set to reset completely upon pressing the green flag?

I'll check... Thanks  big_smile


http://scratch.mit.edu/static/icons/buddy/788987_med.png?t=2011-05-02+15%3A14%3A41
I is epiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiic!     See my stuff here!!!!!

Offline

 

#4 2011-06-03 10:39:49

Sunrise-Moon
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Double green flag

I think this problem is caused by certain variables being reset off-sync. That is, if you have two scripts, and at th beginning of both scripts different variables are reset, you should move all the variables to be reset in the second script to the beginning of the first script.


http://i1067.photobucket.com/albums/u427/HulKDzN/RebornBlade.png

Offline

 

#5 2011-06-03 23:56:40

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Double green flag

Basically, Scratch is running all of your scripts simultaneously, but the order is kind of weird.  Basically, just as the other two said, you need to have everything reset before any of the real scripting runs.


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#6 2011-06-04 03:27:17

emboar30
Scratcher
Registered: 2011-05-03
Posts: 100+

Re: Double green flag

Got all that. Thanks!


http://scratch.mit.edu/static/icons/buddy/788987_med.png?t=2011-05-02+15%3A14%3A41
I is epiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiic!     See my stuff here!!!!!

Offline

 

Board footer