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

#1 2012-03-08 13:17:45

Nomolos
Scratcher
Registered: 2011-07-29
Posts: 1000+

Variable glitch

I have been working on a plants versus zombies game and the variables have become a real problem. Every time I save and quit when I reopen the project the variables stop functioning correctly. I have to take out the 'Set Where to go? to 1' and replace it. I have to do this to every variable and it takes about thirty minutes to to it!

Does anybody else have this problem and know how to fix it?


Goodbye 1.4. I'll always remember you and treasure your awesomeness in my heart.
RIP 1.4: 2007-2013 *Sniffles* *Sobs* *Bursts into tears*

Offline

 

#2 2012-03-08 15:05:06

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: Variable glitch

Make this script for each sprite you want to set to one( and this should be in help with scripts)

When gf clicked
Set [where to go to] to [1]
Im not sure if by "1" you were talking about location or a variable. If its location and say perhaps you want to go to the middle of the screen, do this.
When gf clicked
Go to x [0] y [0]
You can change the location by changing the coordinates.
Wih the first script this will st the variable k 1 right when you click the green flag. Then you don't need to do it manually.

Last edited by turkey3 (2012-03-08 15:07:22)

Offline

 

Board footer