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

#1 2008-03-25 21:39:59

raspberrystrudel
Scratcher
Registered: 2008-03-25
Posts: 3

question about how you hide variables when switching backgrounds

Well, I've tried figuring this out by myself but can't get to the answer!
I start out on the living room 'background' with several variables on the screen. Iike 'food' 'bath' and 'water' and door to go outside to the next background, that leads to a shop and another shop. I can hide the 'food, water and bath' sprites. but the quantites of the sprites  I have the problem with. I've seen this done before from angelical's virtual dog project. So, main question, How do you hide variables when switching backgrounds?

Offline

 

#2 2008-03-25 21:56:12

funkymonkey
Scratcher
Registered: 2007-06-03
Posts: 1000+

Re: question about how you hide variables when switching backgrounds

i don't think it's possible. but it is something they should add in the next version of Scratch. wats the link to angelical's project? i want to see it. most likley she just had a sprite cover up the variable when she wanted it to.
<when green flag clicked>
<hide>

<when I receive[ show!!!
<set x to( variable x
<set y to( variable y

Last edited by funkymonkey (2008-03-25 21:58:49)


http://i243.photobucket.com/albums/ff67/hprules_photos/banner2.jpg
Kuzimu: Dawn of a New Age                                                                                                  Coming May 2010

Offline

 

#3 2008-03-26 05:09:29

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: question about how you hide variables when switching backgrounds

Really, all you can do is make sprites to show the variables.  A pain, but the only way to hide them.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#4 2008-03-26 15:21:49

raspberrystrudel
Scratcher
Registered: 2008-03-25
Posts: 3

Re: question about how you hide variables when switching backgrounds

Heres the link for the virtual dog project. http://scratch.mit.edu/projects/angelical/40435
And thanks for the advice!!!!

Offline

 

#5 2008-03-28 12:51:53

coolkid001
Scratcher
Registered: 2008-01-04
Posts: 19

Re: question about how you hide variables when switching backgrounds

Lol, i just made a sprite with 101 costumes to show a variable... It was a pain but worth it!


ROFLWAFFLE

Offline

 

#6 2008-03-28 12:54:35

coolkid001
Scratcher
Registered: 2008-01-04
Posts: 19

Re: question about how you hide variables when switching backgrounds

Oh and your question, use layers. Make your background into a sprite and make it go like <go back(99)layers> layers back but make sur it covers up the variable. Then whenever you want a new sprite to appear make it<go to front>


ROFLWAFFLE

Offline

 

#7 2008-03-28 12:56:52

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: question about how you hide variables when switching backgrounds

Its easier to make a sprite that shows the digits 0-9, and use 3 of them to show the numbers 0-999...


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#8 2008-04-02 16:57:08

stevii
Scratcher
Registered: 2008-01-19
Posts: 10

Re: question about how you hide variables when switching backgrounds

just make a sprite to cover it up.


<when I receive[ DontShowVarriable
<show>

<when I receive[ DoShow
<hide>

<when green flag clicked>
<go to front>

Last edited by stevii (2008-04-02 16:57:55)

Offline

 

Board footer