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

#1 2012-03-01 17:08:04

SimpleScratch
Scratcher
Registered: 2007-05-25
Posts: 100+

Animation techniques

I've just started teaching using Scratch as an animation tool but I wondering what is a good way of making animations flow.

I start by makiing click the green flag setup all sprites and background to starting positions/states and then I set space bar to start the action.

This is fine if only only sprite, but usually along the way, a second sprite needs to start doing things.

The "best" method I've come up with is to use a broadcast to tell the next sprite to start animating but I feel there should/could/must be a "better" way - some sort of timing script thingy!  smile

Any ideas (and links to projects that show them in action please)
This is to teach age 10/11 pupils how to use Scratch as a storytelling tool  smile

regards

Simon

Offline

 

#2 2012-03-01 17:18:35

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Animation techniques

You can use the timer block in the sensing category to accomplish this. Perhaps you might have a script like this:

when gf clicked
wait until <(timer) > [4.99]>
say [Animations rock!]


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#3 2012-03-01 17:42:09

SimpleScratch
Scratcher
Registered: 2007-05-25
Posts: 100+

Re: Animation techniques

The problem I have with that approach is that if you change one sprites timing sequence, you then have to alter any subsequent events on other sprites to match the timing back up again.

The broadcast method doesn't have that problem (But I just feel there must be a better way  smile  )

Simon

Offline

 

#4 2012-03-01 17:44:05

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Animation techniques

Broadcasts would be best in that case, then. How about this approach:

when gf clicked
wait until <(timer) > [4.99]>
say [Animations rock!]

when [sprite2] clicked
reset timer


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#5 2012-03-02 02:06:46

SimpleScratch
Scratcher
Registered: 2007-05-25
Posts: 100+

Re: Animation techniques

I'm looking for the ability to just set the whole animation rolling with one action so that it plays back like a video  smile

Simon

Offline

 

#6 2012-03-02 09:20:15

Mokat
Scratcher
Registered: 2011-12-08
Posts: 1000+

Re: Animation techniques

SimpleScratch wrote:

I'm looking for the ability to just set the whole animation rolling with one action so that it plays back like a video  smile

Simon

So you want it to restart?
I would use something like this (assuming you've made a variable called "variable"):

when gf clicked
set [variable v] to [0]
forever
wait until <(variable)=(1)>
show
say [hi] for (3) secs
set [sprite 2 showing? v] to [yes]
end
From what you're describing, you will probably have to use the timer and variables, along with
 wait until <> 
, the
 repeat until <> 

Last edited by Mokat (2012-03-02 09:23:02)


http://www.eggcave.com/egg/977371.pnghttp://www.eggcave.com/egg/977376.pnghttp://www.eggcave.com/egg/1005291.pnghttp://www.eggcave.com/egg/996745.png

Offline

 

#7 2012-03-02 09:28:48

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Animation techniques

I'd do it this way with at least one animating sprite:

SPRITE1

when gf clicked
say [Hello!] for (1) secs
wait (3) secs
say [I love that present! Thanks!] for (1) secs // and so on
SPRITE2
when gf clicked
wait (1) secs
say [Hey there!] for (1) secs
switch to costume [finding present v]
wait (1) secs
switch to costume [got a present v]
say [Look at this!] for (1) secs
Using the wait block, you can tell SPRITE1 to wait while SPRITE2 talks, and after SPRITE2 has finished, SPRITE1 talks. This continues for as long as you want.

Look at the wait and say blocks. They take however seconds you want to complete and go to the next block. Add up the ones inbetween every say block, including the say blocks themselves. In the last two stuff being said, it takes 3 seconds for SPRITE2 to find a present. After the 3 seconds, SPRITE1 reacts to the present.

Last edited by rdococ (2012-03-02 09:31:21)

Offline

 

#8 2012-03-02 11:44:43

Smozzick
Scratcher
Registered: 2011-10-23
Posts: 100+

Re: Animation techniques

SimpleScratch wrote:

The problem I have with that approach is that if you change one sprites timing sequence, you then have to alter any subsequent events on other sprites to match the timing back up again.

The broadcast method doesn't have that problem (But I just feel there must be a better way  smile  )

Simon

For the timer method to work in a way that would let you edit easily you could save all of the timings into a list and then set them based on the previous item.

i.e.

replace item [2] of [Timings v] with <<item [1]of [Timings v]> + [0.5]>
Where 0.5 is the time taken by the previous part of the animation.

Just an idea. Broadcast blocks may be better.

Last edited by Smozzick (2012-03-02 11:46:37)


http://i50.tinypic.com/ded8m.png

Offline

 

Board footer