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

#1 2013-03-18 12:52:43

carlsoc2ckkc
New Scratcher
Registered: 2013-03-18
Posts: 2

Why does this work for one sprite but not the next

I am trying to display a series of sprites to spell out a name.  I want each sprite to wait until the previous one is in position before the next is displayed.  So, I have done this block for the 2nd letter.

when gf clicked
set x to 0
set y to 0
hide
wait until <(xposition of sprite11)=[-123]>
wait (1) sec
go to x: (-94) y: (0)
set size to (50%)
show
But when I attempt to use the same structure for the 3rd letter, changing the following blocks to
wait until<(xposition of sprite12)=[-94]>
and
go to x: (-65) y: (0)
the 3rd sprite appears almost immediately after clicking the green flag instead of waiting until the 2nd one is at -94 like I think I'm telling it to.

What am I doing wrong?

Offline

 

#2 2013-03-18 13:45:04

Harald
New Scratcher
Registered: 2013-03-05
Posts: 34

Re: Why does this work for one sprite but not the next

I'm not sure what you are doing wrong, but I have a solution to your problem.

When your first letter is in position, make it broadcast something that tells the second letter to get in position. Then, when in position, make the second one broadcast something to make the third one get in position, and so on. Hope it helps. ^^

Offline

 

#3 2013-03-18 16:11:58

rpglurker
New Scratcher
Registered: 2013-01-17
Posts: 24

Re: Why does this work for one sprite but not the next

put a time delay or a glide to position...goto happens almost instantly so you need to delay it to get the effect you are looking for...

Cheers

Offline

 

#4 2013-03-18 21:55:15

carlsoc2ckkc
New Scratcher
Registered: 2013-03-18
Posts: 2

Re: Why does this work for one sprite but not the next

Thanks!  The broadcast works quite well!

Offline

 

Board footer