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

#1 2010-07-11 20:12:13

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

what is with the weird dual-state thing that happens when saving?

Is it just my bad scripting? What I am referring to is how, especially on a larger project, sometimes you can hit the green flag and everything resets and starts normally and other times it is like variables don't reset and other weird things happen.

It seems like I've noticed that if you click the flag and it goes wrong, it works if you just click the flag again...??? And for some reason I am paranoid that if you upload it in the "bad" state, it can appear to mess up when other people run it for the first time.

Anyone can drop some science on me plz? TIA  smile


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#2 2010-07-11 20:35:39

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: what is with the weird dual-state thing that happens when saving?

I think it's something about the timing - it's happened to me before. I'm not sure how to explain it, but it is definitely to do with the timing  big_smile

Offline

 

#3 2010-07-11 22:53:14

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

Re: what is with the weird dual-state thing that happens when saving?

I'm really not sure what causes the problem, but I wouldn't stress out over it. While certain scripts may or may not cause it (I'm not sure about that), I wouldn't worry about it.  smile  It certainly isn't a result of bad scripting - this happens to even some of the best projects.


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

 

#4 2010-07-11 23:05:08

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: what is with the weird dual-state thing that happens when saving?

It has to do with timing and the order that variables are reset.


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#5 2010-07-11 23:12:52

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: what is with the weird dual-state thing that happens when saving?

Thanks, I certainly feel less paranoid now. Was I just imagining the part about uploading it in the "bad" state?


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#6 2010-07-11 23:39:13

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: what is with the weird dual-state thing that happens when saving?

I think so.

Offline

 

#7 2010-07-12 01:41:36

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: what is with the weird dual-state thing that happens when saving?

When you press the flag it starts all:
When Flag Clicked
scripts. From experience if you have too many Scratch will run them in the order you made them. So it gets timing wrong. The simple solution is to do:

When Flag Clicked
broadcast |Start v|

Then start all you scripts with:

When |Start v| recieved

From experience I know the 2nd way works.


You can now reach me on Twitter @johnnydean1_

Offline

 

#8 2010-07-12 12:56:21

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: what is with the weird dual-state thing that happens when saving?

cool, thanks for the nfo!


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

Board footer