复习 — 我们学到哪里了 5 分钟
上一课,舞台上满是角色。它们都跟着节拍动。
next costume加上一拍的等待,就是跳舞。- 一次“脉动”会在一拍里变大,再缩回去。
- 循环改变了什么,循环上面的积木就要把它放回原样。
快问快答
在加分任务里,每个角色自己数 8 拍,找到音乐变强的那一刻。五分钟后会出什么问题?
看答案
它们会慢慢错开。等待从来不会刚好是半秒。所以三个各自数拍的角色,会慢慢对不上。今天只让一个角色来数。其他角色照它说的做。
今天的主题 3 分钟
- 段落:主歌和副歌是两种不同的动法
- 用
broadcast [verse v]和when I receive [verse v]当作信号 stop [other scripts in sprite v],以及为什么新的一段需要它- 每一段都用
switch backdrop to [Spotlight v]换背景
学习目标
学完这一课,你能够:
- 写一个管着演出顺序的脚本。它喊出每一段。
- 给一个角色两种动法,并且干净地切换。
- 收到信号时,改变整个舞台的样子。
学一学 — 信号和段落 27 分钟
为什么要有一个角色来管
三个各自数拍的角色,就像三个时钟。开始时它们一样,到最后就不一样了。改数字也修不好。
办法不是数得更准,而是只用一个来数。一个角色管着演出顺序,把它喊出来。其他角色等着听指令。
导演
导演就是负责指挥的角色。添加 Microphone(麦克风)角色。它从不跳舞。它唯一的工作就是演出顺序。
when flag clicked
broadcast [verse v]
wait (8) seconds
broadcast [chorus v]
wait (8) seconds
broadcast [verse v]
wait (8) seconds
broadcast [chorus v]
舞者们听指令
每个舞者把它的 when flag clicked 换成两个 when I receive [verse v] 帽子积木。每一段一个帽子积木。每个帽子积木下面都有自己的循环。
when I receive [verse v]
stop [other scripts in sprite v]
set size to (90) %
forever
next costume
wait (0.5) seconds
end
when I receive [chorus v]
stop [other scripts in sprite v]
set size to (120) %
forever
next costume
change [color v] effect by (25)
wait (0.25) seconds
end
让它成功的那块积木
stop [other scripts in sprite v] 是关键的积木。如果没有它会怎样?那么 chorus 会开始第二个 forever 循环。主歌的循环还在跑。所以角色换造型快了一倍。
这很容易看出来。舞者抖得太快了。
怎么用: 点绿旗开始。不用按别的 — 从头看到尾,然后用 ↺ Reset 再播一次。
舞台也在听
换一个新背景,观众就知道歌进入下一段了。这是最快的办法。舞台也收到同样的信号。
when I receive [verse v]
switch backdrop to [Concert v]
when I receive [chorus v]
switch backdrop to [Spotlight v]
怎么用: 点绿旗开始。不用按别的 — 从头看到尾,然后用 ↺ Reset 再播一次。
基础任务 — 给歌一个结构 25 分钟
打开你上一课的视频。这一步会改变它开始的方式。每做完一步就试一试。
怎么用: 点绿旗开始。不用按别的 — 从头看到尾,然后用 ↺ Reset 再播一次。
第 1 步 — 导演
- 添加 Microphone(麦克风)角色。把它放在舞台中间。
- 给它一组演出顺序的积木:广播,等待,广播,等待。
- 一边做一边建好两个消息
verse和chorus。 - 按绿旗。现在还什么都不会发生。没有人在听。
第 2 步 — 一个舞者来听
- 在你的第一个舞者上,把它的绿旗帽子积木换成
when I receive [verse v]。 - 把
stop [other scripts in sprite v]放在帽子积木正下方。 - 播放。导演喊主歌时,舞者应该开始跳。
第 3 步 — 副歌的动法
- 右键点帽子积木,选 Duplicate(复制)。把新的帽子积木改成
when I receive [chorus v]。 - 让副歌这一组更大、更快,或者变色发亮。
- 播放。看它在第 8 秒时切换。
第 4 步 — 其他所有角色
- 在你的第二个舞者和鼓上做同样的事。
- 每个都有两组积木和两个停止。
- 播放。整个舞台应该同时变化。
第 5 步 — 舞台
- 把 Spotlight(聚光灯)背景加到你的作品里。
- 给舞台那两组“收到消息就换背景”的积木。
- 播放。房间应该跟着歌一起变。
第 6 步 — 从头看到尾
- 切换到全屏。把四段都看完。什么都不要碰。
- 有东西从上一段一直在继续吗?那就是少了一个停止。
第一段副歌之后,我的舞者疯狂闪动。
它身上有两个循环同时在跑。副歌那一组少了 stop [other scripts in sprite v]。或者它放在了循环下面,而不是上面。
我按绿旗,什么都没发生。
每个角色都在等消息,但没有人发消息。导演需要它的 when flag clicked。
音乐停了。
你的伴奏原来在 when flag clicked 下面。你把它改成了收到消息。给伴奏它自己的绿旗帽子积木。这样它会在每一段都一直播放。
两段,一眼分出来
做一段主歌和一段副歌。一个陌生人关掉声音,也能把它们分出来。
- 至少有两样不一样:大小、速度、颜色,或者谁在跳舞。
- 变化要靠信号,不是靠每个角色里面自己计时。
- 主歌里的东西不会在副歌里继续。
完整的演出顺序
把歌写出来:主歌,副歌,主歌,副歌。把它放进一个读起来像计划的脚本里。
- 四段,由一个角色喊出来。
- 每一段的长度由你来定。
- 背景跟着段落一起换。
Teacher note — the script that is a document
The director’s stack is worth dwelling on. It is the first script in Level 1 that is not doing a job so much as describing a plan, and a pupil can hand it to somebody else and be understood. That is a real idea, and it is worth naming.
是结尾,不是停止
最后一段副歌之后,视频应该结束。加一个最后的声音和一个姿势。舞台保持不动。
- 再加一个消息,在最后一段之后发出。
- 每个角色都停下循环,停在一个造型上。
- 音乐完整地结束,不是在循环中间被切断。
- 角落里没有东西还在动。
怎么用: 点绿旗开始。不用按别的 — 从头看到尾,然后用 ↺ Reset 再播一次。
Teacher reveal — the ending cue
when I receive [end v]
stop [other scripts in sprite v]
switch costume to [anina stance v]
set size to (100) %
clear graphic effects
On every dancer. The stop kills the section loop, and the three blocks under it put the sprite into a pose you chose rather than whatever costume it happened to be on.
The director ends with wait (8) seconds then broadcast [end v]. Note it does not need stop [all v] at all — when every loop has stopped, the project is finished on its own.
安静段
加上第三段。在这一段里,音乐变小声。其他舞者淡出。只剩一个舞者在灯光下。
怎么用: 点绿旗开始。不用按别的 — 从头看到尾,然后用 ↺ Reset 再播一次。
- 第三个消息,在演出顺序里有它自己的位置。
- 其他舞者用 ghost(虚像)特效淡出。他们不是消失。
- 音乐至少有一层停下来,之后再回来。
- 下一段要把每个人恢复成原来的样子。
Teacher notes — fading, and putting it back
when I receive [breakdown v]
stop [other scripts in sprite v]
set [ghost v] effect to (60)
when I receive [chorus v]
stop [other scripts in sprite v]
set [ghost v] effect to (0)
set size to (120) %
forever
next costume
wait (0.25) seconds
end
The important half is the second stack. Every section has to set the things the other sections change, or a sprite that faded in the breakdown is still faint in the chorus. That is the same “put it back” rule as last lesson, one level up.
Going further: the drum dropping out is stop [this script v] in the breakdown and a fresh receive to start it again. There is a neater way to say “play only during these sections”, and it needs a variable holding the name of the current section — which is a Level 2 idea.
总结 4 分钟
一首歌是由几段组成的。每一段都需要有人来指挥。
- 一个角色管着演出顺序。它在对的时间发出
broadcast [verse v]。 - 其他角色每一段都有一组
when I receive [verse v]积木。 - 每一组都以
stop [other scripts in sprite v]开头。不然,旧的一段会在新的一段下面继续跑。 - 舞台也在听。背景告诉观众现在到哪一段了。
- 信号(cue)
- 一个告诉大家“新的一段开始了”的消息。
- 导演
- 管着演出顺序的那一个角色。它别的什么都不做。
- stop other scripts in sprite(停止这个角色的其他脚本)
- 停下这个角色的其他几组积木。换段落时需要它。
- 段落
- 一种动法,有它自己的样子和自己的速度。
下一课:大结局。观众可以用键盘来玩。你把视频分享出去。