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

#1 2007-12-17 22:03:37

Robin7
Scratcher
Registered: 2007-11-09
Posts: 100+

Synchronization of Sprites

On my project Santa Claus's Job, I used broadcasts to synchronize the sprites and scene changes. Is there a better way?
This is the project: http://scratch.mit.edu/projects/Robin7/67486

Offline

 

#2 2007-12-18 01:27:07

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Synchronization of Sprites

I think broadcasts are exactly the right synchronization method for projects like yours. Another way to synchronize sprites and scene changes would be to use the timer. This works well in (simple) animations with fixed time intervals, but won't do in interactive projects relying on user input to trigger events.

You're doing just fine, keep up the great work!


Jens Mönig

Offline

 

#3 2007-12-18 01:38:54

Robin7
Scratcher
Registered: 2007-11-09
Posts: 100+

Re: Synchronization of Sprites

Ok, thanks!  smile

Offline

 

#4 2007-12-18 12:24:54

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

Re: Synchronization of Sprites

I think that broadcasts are the correct way to synchronize events between sprites, and are even useful for synchronizing within a sprite.  I use the timer very little—only for those things that need a specific time, rather than coming after some other event.

For an animation, I usually create a master script on the stage that consists of a series of broadcast and wait commands, one for each scene.  Scene scripts may include other broadcasts, to do specific actions that may be needed in multiple scenes.

Offline

 

#5 2007-12-19 01:52:18

MyRedNeptune
Community Moderator
Registered: 2007-05-07
Posts: 1000+

Re: Synchronization of Sprites

I don't remember if I ever used the timer.


http://i52.tinypic.com/5es7t0.png I know what you're thinking! "Neptune! Get rid of those filthy advertisements and give us back the Zarathustra siggy, you horrible person!" Well, don't worry about it, the Zara siggy will be back soon, new and improved! ^^ Meanwhile, just do what the sig tells you to. >.>

Offline

 

#6 2007-12-19 09:36:53

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

Re: Synchronization of Sprites

I used the timer for the "Smooth Glide" demo (http://scratch.mit.edu/projects/kevin_karplus/68800), since the goal was to provide a glide with a fixed time.

Offline

 

Board footer