Apricotで複数キャラクターを表示する方法

D

Apricotで複数キャラクターを表示して会話を行うデモをつくってみました。

キャラクターを複数表示するには、characterタグを表示させたい数だけ記述します。
また、複数のキャラクターで会話を行う方法は、いくつか手段がありますが一番簡単な方法は、喋っているキャラクターがいる場合は、waitタグで指定の時間待つことで実現出来ます。


ちなみに上記の動画で使ってる台詞は、下記のビデオから拝借しました。

東方って何?エロゲ?
http://www.youtube.com/watch?v=27BY4DKz-zw


上記の動画のXMLファイルです。

<?xml version="1.0" encoding="utf-8" ?>
<script id="東方って何?エロゲ?">
  <character name="博麗霊夢" x="0" y="0" width="340" height="400" offset-x="-15" offset-y="80">
    <sequence name="Neutral">
      <motion fps="8" z-index="0">
        <image x="25" y="-30">Images\Reimu.png</image>
      </motion>
    </sequence>
    <sequence name="Say">
      <motion fps="8" z-index="1">
        <clear x="25" y="-30" width="320" height="320" color="Transparent" />
        <wait duration="4000" />
      </motion>
    </sequence>
    <sequence name="Bound">
      <motion loop="False" fps="30" z-index="0" iterations="3">
(省略)
      </motion>
    </sequence>
    <sequence name="Quake">
      <motion loop="False" fps="30" z-index="0">
(省略)
      </motion>
    </sequence>
    <sequence name="DoubleClick">
      <call name="Bound" />
      <message>ねえねえ、まりさ。</message>
      <call name="Say" />
      <call name="marisaRe0" />
      <motion fps="8" z-index="1">
        <clear x="25" y="-30" width="320" height="320" color="Transparent" />
        <wait duration="4000" />
      </motion>
      <message>最近、東方 ってよくきくけど</message>
      <call name="Say" />
      <message>あれ何?萌え同人エロゲなの?</message>
      <call name="Say" />
      <call name="marisaRe1" />
      <motion fps="8" z-index="1">
        <clear x="25" y="-30" width="320" height="320" color="Transparent" />
        <wait duration="5000" />
      </motion>
      <message>( ゚∀゚)o彡゜えーりん!えーりん!</message>
      <call name="Say" />
      <call name="marisaRe2" />
      <motion fps="8" z-index="1">
        <clear x="25" y="-30" width="320" height="320" color="Transparent" />
        <wait duration="10000" />
      </motion>
      <message>全然そんな感じしないじゃない。萌え動画か、電波フラッシュばかり見かけるわよ?</message>
      <call name="Say" />
      <message>東方っていえば「魔理沙は大変なものを盗んでいきました」とか</message>
      <call name="Say" />
      <call name="marisaRe3" />
      <motion fps="8" z-index="1">
        <clear x="25" y="-30" width="320" height="320" color="Transparent" />
        <wait duration="5000" />
      </motion>
      <message>「患部で止まってすぐ溶ける」しか頭になかったわ。</message>
      <call name="Say" />
      <call name="marisaRe4" />
      <motion fps="8" z-index="1">
        <clear x="25" y="-30" width="320" height="320" color="Transparent" />
        <wait duration="10000" />
      </motion>
      <call name="Bound" />
      <message>なによ悪かったわね</message>
      <call name="Say" />
    </sequence>
  </character>
  <character name="霧雨魔理沙" x="0" y="0" width="340" height="390" offset-x="0" offset-y="70">
    <sequence name="Neutral">
      <motion fps="8" z-index="0">
        <image x="10" y="-20">Images\Marisa.png</image>
      </motion>
    </sequence>
    <sequence name="marisaSay">
      <motion fps="8" z-index="1">
        <clear x="10" y="-20" width="320" height="320" color="Transparent" />
        <wait duration="4000" />
      </motion>
    </sequence>
    <sequence name="marisaBound">
      <motion loop="False" fps="30" z-index="0" iterations="3">
(省略)
      </motion>
    </sequence>
    <sequence name="marisaQuake">
      <motion loop="False" fps="30" z-index="0">
(省略)
      </motion>
    </sequence>
    <sequence name="marisaRe0">
      <motion fps="8" z-index="1">
        <clear x="25" y="-30" width="320" height="320" color="Transparent" />
        <wait duration="5000" />
      </motion>
      <message>どうしたんだ霊夢?</message>
      <call name="marisaSay" />
    </sequence>
    <sequence name="marisaRe1">
      <motion fps="8" z-index="1">
        <clear x="25" y="-30" width="320" height="320" color="Transparent" />
        <wait duration="10000" />
      </motion>
      <call name="marisaBound" />
      <message>おいおい、霊夢。それは違うぜ!</message>
      <call name="marisaSay" />
    </sequence>
    <sequence name="marisaRe2">
      <motion fps="8" z-index="1">
        <clear x="25" y="-30" width="320" height="320" color="Transparent" />
        <wait duration="5000" />
      </motion>
      <message>・・・・・・。</message>
      <call name="marisaSay" />
      <message>東方、正確に「東方プロジェクト」は弾幕シューティングだぜ!</message>
      <call name="marisaSay" />
    </sequence>
    <sequence name="marisaRe3">
      <motion fps="8" z-index="1">
        <clear x="25" y="-30" width="320" height="320" color="Transparent" />
        <wait duration="10000" />
      </motion>
      <message>ニコニコで東方に火がついたのは「魔理沙は大変なものを盗んでいきました」の影響だぜ。(ニコニコ新参にアリスを指して魔理沙とか言われてむかついたのは内緒だぜ)</message>
      <call name="marisaSay" />
    </sequence>
    <sequence name="marisaRe4">
      <motion fps="8" z-index="1">
        <clear x="25" y="-30" width="320" height="320" color="Transparent" />
        <wait duration="5000" />
      </motion>
      <message>ニコニコで東方がよく勘違いされるのも仕方ないぜ・・・。</message>
      <call name="marisaSay" />
      <message>ニコニコだとそういった電波動画や萌え動画ばかりあがってくるから、東方をエロゲか何かと勘違いしてる人が多くてね。霊夢みたいに。</message>
      <call name="marisaSay" />
    </sequence>
  </character>
 </script>