Pages: 1
Topic closed
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
Offline
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. It certainly isn't a result of bad scripting - this happens to even some of the best projects.
Offline
It has to do with timing and the order that variables are reset.
Offline
Thanks, I certainly feel less paranoid now. Was I just imagining the part about uploading it in the "bad" state?
Offline
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.
Offline
Topic closed
Pages: 1