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

#1 2007-06-03 22:27:37

DrJim
Scratcher
Registered: 2007-05-26
Posts: 100+

Making slider for variable disappear.

I just finished a moving background script with a variable for speed control (http://scratch.mit.edu/projects/DrJim/10069 ). For some reason, however, the slider for the speed control doesn't appear until the script is about half way through.  When it appears, it seems to work fine.

Can someone please tell me what I'm doing wrong - thanks.

Offline

 

#2 2007-06-04 00:42:36

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Making slider for variable disappear.

You probably forgot to send your moving background to the back.  Use "move back 99 layers" on it.

Offline

 

#3 2007-06-04 11:19:31

DrJim
Scratcher
Registered: 2007-05-26
Posts: 100+

Re: Making slider for variable disappear.

Thanks - the great thing about this forum is you can post a question before you go to bed and get the answer the next morning. :-)

Due to the basic structure of my moving background approach - namely that it requires multiple "background" sprites to really be in the background in order to avoid/minimize flicker - I can't just use a simple "go back 99 layers" command.  However,  the actual solution shouldn't be much harder.

Two more questions:

Am I correct that every sprite and/or variable box is counted as a separate "level"?

Is there a way to move a slider/variable box to the front with a command?  The only way I've found is to move it with the mouse, which appears to always move anything to the front.

Offline

 

#4 2007-06-04 12:08:52

natalie
Scratch Team
Registered: 2007-03-07
Posts: 100+

Re: Making slider for variable disappear.

Good question...

For now, I think the only way to automatically move a variable box to the top would be to move the sprites back (using the "go back _ layers" block in the Looks category).

This is something we should consider for future versions...I wonder what do you think would work best, (e.g., should a variable box always be on top?).

Offline

 

#5 2007-06-04 16:12:35

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Making slider for variable disappear.

Perhaps variable blocks should be sprites in their own right?
That is, a sprite may have as a costume "variable display" and display any variable from any sprite.

Offline

 

#6 2007-06-04 17:37:47

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

Re: Making slider for variable disappear.

That's a good idea - then we could treat them exactly like sprites, showing them only on command, moving them around, etc.


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

 

#7 2007-06-04 20:02:05

DrJim
Scratcher
Registered: 2007-05-26
Posts: 100+

Re: Making slider for variable disappear.

I'll add my agreement. Beaing able to treat them as having the same characteristics as sprites would be quite convenient.

Offline

 

#8 2007-06-05 13:27:40

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

Re: Making slider for variable disappear.

Eg, all the games that gome with sliders - you could have a key-press hide/show them so they don't clutter up the screen when you don't need 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

 

Board footer