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

#1 2013-02-14 13:24:52

Genius158
New Scratcher
Registered: 2013-02-14
Posts: 3

Background numbering

Hi I'm new, could someone please tell me how to stop the background numbers changing? Everytime I write some mor eprogram, the numbers have changed and don't match the ones I have prgrammed.

Offline

 

#2 2013-02-17 20:20:13

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Background numbering

Yeah, that can be annoying.  Would it work better if you used names instead of numbers?


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2013-02-17 20:22:10

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Background numbering

Instead of using background numbers, you can switch to a background with the

switch to background [background name v]
block. That way, even when you add or rearrange backgrounds, the names will stay the same so you won't have to update your script.

If you need to detect the current background, you could use a variable and set it alongside the background:
switch to background [background name v]
set [background v] to [background name]
You can then refer to that in another script:
say (background)


nXIII

Offline

 

Board footer