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

#1 2008-10-06 19:10:15

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

a go to layer block

The most frustrating thing ever in scratch has to be controlling the layers that the sprites are on. A lot of the time go to front then go back (whatever amount) layers works but at other times it doesn't. Also right clicking a sprite and pressing "show" seems to mess up the layers.

I have spent an hour just trying to get the layers worked out on one project.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#2 2008-10-06 21:26:17

boinoinoi
Scratcher
Registered: 2007-06-05
Posts: 500+

Re: a go to layer block

Very true. I'm getting tired of:
forever
go to front
go back # layers
end forever


http://i30.tinypic.com/335fpxx.jpg
"Boinoinoi is the only person on the forums that I expect to be wearing a monocle all the time behind that screen, so I'm sure being as classy as he is, he knows what he's doing"        http://myfastcounter.com/count.php?c_style=88&id=1284259111http://myfastcounter.com/count.php?c_style=88&id=1286068127

Offline

 

#3 2008-10-06 21:33:10

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: a go to layer block

Does it ell you where what layer a sprites on?

Offline

 

#4 2008-10-06 21:40:22

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: a go to layer block

keroro645 wrote:

Does it ell you where what layer a sprites on?

No it doesn't  sad


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#5 2008-10-06 21:48:32

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: a go to layer block

archmage wrote:

No it doesn't  sad

That would be useful.

Offline

 

#6 2008-10-06 22:10:34

skryed
Scratcher
Registered: 2008-04-26
Posts: 57

Re: a go to layer block

hey archmage, i made a project for 1.4 bricks, take a look


http://i10.photobucket.com/albums/a124/boysofsheahem/alphabet/I-1.pnghttp://i10.photobucket.com/albums/a124/boysofsheahem/alphabet/L-1.pnghttp://i10.photobucket.com/albums/a124/boysofsheahem/alphabet/Q-1.png

Offline

 

#7 2008-10-07 05:42:06

Nikimax
Scratcher
Registered: 2008-06-22
Posts: 36

Re: a go to layer block

Layers will be useful... But it will be cool if we receive only <Go above (Sprite)> and <Go below(Sprite)> blocks. When used in Java these methods done it perfectly


http://scratch.mit.edu/projects/Nikimax/291754
Test yourself=)

Offline

 

#8 2008-10-07 11:13:36

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: a go to layer block

You're right.

On most projects using lots of layers (my racing game for example) i let them initialize automatically. Just add

broadcast [initialize] and wait
broadcast [start]

An "initialize" script should look like this:

Sprite1:

When I receive [initialize]
wait (0) secs
go to front

Sprite2:

When I receive [initialize]
wait (0.1) secs
go to front

Sprite3:

When I receive [initialize]
wait (0.2) secs
go to front

Sprite 1 will behind sprite 2 & 3
Sprite 2 will be in front of 1, behind 2
Sprite 3 will be on top of it.

Especially when I mess up the layers in development mode I am happy I added this  big_smile
Click the green flag and everything's fine again...

I never use the go back to layer block, each sprite is on it's own layer which means they are actually sorted. (You pick out the one on top, ...) Depending on how fast the block execute, the layers are different each time.


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#9 2008-10-12 09:29:13

relyt12101
Scratcher
Registered: 2007-05-19
Posts: 500+

Re: a go to layer block

"Initialize" is a really great idea -


http://img392.imageshack.us/img392/2860/pspbanneregg089deiy0.png

Offline

 

#10 2008-10-13 16:01:47

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: a go to layer block

That would be a great idea!

Offline

 

Board footer