-- ==========================================================================
-- \file   Story04_0010.lua
-- \brief  ストーリー04 「熱砂の嵐」 ミッションID:v410
-- \author 寺井
-- ==========================================================================

Core.RequireScript("script/sequence.lua");

-- イベントシーケンス
sequence_table = {
    {
        -- 待機
        Name = "Idle",
        Idle = {
        },
        Active = {
        },
    },
    {
        -- アナウンスカメラ
        Name = "PreBattle",        -- バトル開始前デモ --熱砂の嵐
        Idle = {
        },
        Active = {
            { Scenario.FadeOut, "White", 1 },

            { Camera.SetRawPosition, 6.71278, 9.84559, 16.95096 },         --field
            { Camera.SetRawInterest, 10.15655, 9.26746, 20.52666 },
            { Camera.SetDOFParam, 1.76, 2.0, 4.0, 0.3 },
            { Camera.EnableDOF },
            { Camera.Activate },

            { StartImmediate },
            { Chara.SetBattlePosition, "Player", 00 },
            { Chara.SetBattlePosition, "UWE", 01 },
            { Chara.SetBattlePosition, "ELF", 02 },
            { EndImmediate },

            { Chara.SetRotateY, "Player", 180 },
--            { Chara.SetRotateY, "Player", 95 },
            { Chara.SetRotateY, "UWE", 220 },
            { Chara.SetRotateY, "ELF", 185 },

            { Chara.SetBlendThreshold, "UWE", 8 },
            { Chara.SetBlendThreshold, "ELF", 8 },

            { Chara.ChangeAction, "Player", "Safety_Loop" },
            { Chara.ChangeAction, "UWE", "Safety_Loop" },
            { Chara.ChangeAction, "ELF", "Safety_Loop" },
            { Chara.ChangeAction, "BEA", "Safety_Loop" },
            
            { Chara.ChangeAction, "MAT", "Safety_Loop" },
            { Chara.ChangeAction, "CAR", "Safety_Loop" },
            { Chara.ChangeAction, "NAT", "Safety_Loop" },
            { Chara.ChangeAction, "MAR", "Safety_Loop" },
            { Chara.ChangeAction, "HAL", "Safety_Loop" },
            { Chara.ChangeAction, "ANN", "Safety_Loop" },
            { Chara.ChangeAction, "BIL", "Safety_Loop" },
            { Chara.ChangeAction, "NIN", "Safety_Loop" },
            { Chara.ChangeAction, "SIZ", "Safety_Loop" },
            { Chara.ChangeAction, "KAI", "Safety_Loop" },
            { Chara.ChangeAction, "SER", "Safety_Loop" },
            
            { Chara.ChangeAction, "Accessory", "Safety_Loop" },
            { Chara.ChangeAction, "A_UWE", "Safety_Loop" },
            { Chara.ChangeAction, "A_ELF", "Safety_Loop" },
            { Chara.ChangeAction, "A_BEA", "Safety_Loop" },
            
            { Chara.ChangeAction, "A_MAT", "Safety_Loop" },
            { Chara.ChangeAction, "A_CAR", "Safety_Loop" },
            { Chara.ChangeAction, "A_NAT", "Safety_Loop" },
            { Chara.ChangeAction, "A_MAR", "Safety_Loop" },
            { Chara.ChangeAction, "A_HAL", "Safety_Loop" },
            { Chara.ChangeAction, "A_ANN", "Safety_Loop" },
            { Chara.ChangeAction, "A_BIL", "Safety_Loop" },
            { Chara.ChangeAction, "A_NIN", "Safety_Loop" },
            { Chara.ChangeAction, "A_SIZ", "Safety_Loop" },
            { Chara.ChangeAction, "A_KAI", "Safety_Loop" },
            { Chara.ChangeAction, "A_SER", "Safety_Loop" },

            { Scenario.FadeIn, "White", 15 },

            { Sound.PlaySE, "Camera_Change" },

            { StartImmediate },
            { Camera.SetRawPosition, 6.18767, 2.22891, 16.21419, 240 },         --=>field :move
            { Camera.SetRawInterest, 9.70241, 2.23257, 19.76751, 240 },
            { EndImmediate },

            { Wait, 2.0 },

            { UI.SelectAutoTalk, "ID_NAM_UWE",  "ID_M_4F1_E4030_010_EK2", 6.0, "ID_CHO_02810", "ID_CHO_02820" },
            { Sound.PlayVoice, "E4030_010_EK2" },          --♪
            { Chara.ChangeAction, "UWE", "Safety_Loop_Talk" },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "UWE", "Safety_Loop" },
            { UI.WaitTalk },

            { StartImmediate },
            { Camera.SetRawPosition, 6.18767, 2.22891, 16.21419 },         --=> uwe + elf
            { Camera.SetRawInterest, 9.70241, 2.23257, 19.76751 },
            { EndImmediate },

            { StartImmediate },
            { Camera.SetRawPosition, 5.86811, 2.24672, 16.33599, 660 },         --=> uwe + elf :move
            { Camera.SetRawInterest, 10.02792, 2.21706, 19.10631, 660 },
            { EndImmediate },

            { UI.WaitTalk },
            { Chara.ChangeAction, "UWE", "Safety_Loop" },
            { BranchTalkEx, "A2", "B3" },
        },
    },
    {
        Name = "A2",
        Idle = {
            { ChangeTable, "Active" },
        },
        Active = {
            { StartImmediate },
            { Camera.SetRawPosition, 4.39645, 2.38280, 16.77345 },         --=> P + uwe + elf(side)
            { Camera.SetRawInterest, 8.85749, 1.87141, 18.44682 },
            { Chara.SetIK, "Player", "ELF", "b_C_Head", 5 },
            { EndImmediate },

            { StartImmediate },
            { Camera.SetRawPosition, 4.52971, 2.39937, 16.45063, 990 },         --=> P + uwe + elf(side) :move
            { Camera.SetRawInterest, 8.55245, 1.88798, 19.00379, 990 },
            { EndImmediate },

            { UI.UserTalk, "ID_NAM_ELF",  "ID_M_4F1_E4030_020_EK3" },
            { Sound.PlayVoice, "E4030_020_EK3" },          --♪
            { Chara.ChangeAction, "ELF", "Safety_Loop_Talk" },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "ELF", "Safety_Loop" },
            { UI.WaitTalk },

            { Chara.SetIK, "ELF", "Player", "b_C_Head", 5 },

            { UI.UserTalk, "ID_NAM_ELF",  "ID_M_4F1_E4030_030_EK3" },
            { Sound.PlayVoice, "E4030_030_EK3" },          --♪
            { Chara.ChangeAction, "ELF", "Safety_Loop_Talk" },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "ELF", "Safety_Loop" },
            { UI.WaitTalk },

            { UI.SelectAutoTalk, "ID_NAM_ELF",  "ID_M_4F1_E4030_040_EK3", 4.0, "ID_CHO_02820" },
            { Sound.PlayVoice, "E4030_040_EK3" },          --♪
            { Chara.ChangeAction, "ELF", "Safety_Loop_Talk" },
            { Wait, 2.0 },
            { Chara.UnsetIK, "ELF", 5 },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "ELF", "Safety_Loop" },
            { UI.WaitTalk },


            { BranchTalkEx, "B23" },
        },
    },
    {
        Name = "A2a",
        Idle = {
            { ChangeTable, "Active" },
        },
        Active = {
            { Chara.SetIK, "Player", "ELF", "b_C_Head", 5 },
            { Chara.SetIK, "ELF", "Player", "b_C_Head", 5 },

            { StartImmediate },
            { Camera.SetRawPosition, 4.52971, 2.39937, 16.45063, 990 },         --=> P + uwe + elf(side) :move
            { Camera.SetRawInterest, 8.55245, 1.88798, 19.00379, 990 },
            { EndImmediate },

            { UI.UserTalk, "ID_NAM_ELF",  "ID_M_4F1_E4030_020_EK3" },
            { Sound.PlayVoice, "E4030_020_EK3" },          --♪
            { Chara.ChangeAction, "ELF", "Safety_Loop_Talk" },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "ELF", "Safety_Loop" },
            { UI.WaitTalk },

            { UI.UserTalk, "ID_NAM_ELF",  "ID_M_4F1_E4030_030_EK3" },
            { Sound.PlayVoice, "E4030_030_EK3" },          --♪
            { Chara.ChangeAction, "ELF", "Safety_Loop_Talk" },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "ELF", "Safety_Loop" },
            { UI.WaitTalk },

            { UI.SelectAutoTalk, "ID_NAM_ELF",  "ID_M_4F1_E4030_040_EK3", 4.0, "ID_CHO_02810", "ID_CHO_02820" },
            { Sound.PlayVoice, "E4030_040_EK3" },          --♪
            { Chara.ChangeAction, "ELF", "Safety_Loop_Talk" },
            { Wait, 2.0 },
            { Chara.UnsetIK, "ELF", 5 },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "ELF", "Safety_Loop" },
            { UI.WaitTalk },

            { BranchTalkEx, "A2a", "B23" },
        },
    },
    {
        Name = "A23",
        Idle = {
            { ChangeTable, "Active" },
        },
        Active = {
            { Chara.SetIK, "Player", "ELF", "b_C_Head", 5 },
            { UI.UserTalk, "ID_NAM_ELF",  "ID_M_4F1_E4030_020_EK3" },
            { Sound.PlayVoice, "E4030_020_EK3" },          --♪
            { Chara.ChangeAction, "ELF", "Safety_Loop_Talk" },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "ELF", "Safety_Loop" },
            { UI.WaitTalk },

            { Chara.SetIK, "ELF", "Player", "b_C_Head", 5 },

            { UI.UserTalk, "ID_NAM_ELF",  "ID_M_4F1_E4030_030_EK3" },
            { Sound.PlayVoice, "E4030_030_EK3" },          --♪
            { Chara.ChangeAction, "ELF", "Safety_Loop_Talk" },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "ELF", "Safety_Loop" },
            { UI.WaitTalk },

            { UI.AutoTalk, "ID_NAM_ELF",  "ID_M_4F1_E4030_040_EK3", 5.7 },
            { Sound.PlayVoice, "E4030_040_EK3" },          --♪
            { Chara.ChangeAction, "ELF", "Safety_Loop_Talk" },
            { Wait, 2.0 },
            { Chara.UnsetIK, "ELF", 5 },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "ELF", "Safety_Loop" },
            { UI.WaitTalk },

            { ContinueEvent, "C" },
        },
    },
    {
        Name = "B3",
        Idle = {
            { ChangeTable, "Active" },
        },
        Active = {
            { StartImmediate },
            { Camera.SetRawPosition, 4.39645, 2.38280, 16.77345 },         --=> P + uwe + elf(side)
            { Camera.SetRawInterest, 8.85749, 1.87141, 18.44682 },
            { Chara.SetIK, "Player", "UWE", "b_C_Head", 5 },
            { Chara.SetIK, "UWE", "Player", "b_C_Head", 5 },
            { EndImmediate },

            { StartImmediate },
            { Camera.SetRawPosition, 4.52971, 2.39937, 16.45063, 990 },         --=> P + uwe + elf(side) :move
            { Camera.SetRawInterest, 8.55245, 1.88798, 19.00379, 990 },
            { EndImmediate },

            { UI.UserTalk, "ID_NAM_UWE",  "ID_M_4F1_E4030_050_EK2" },
            { Sound.PlayVoice, "E4030_050_EK2" },          --♪
            { Chara.ChangeAction, "UWE", "Safety_Loop_Talk" },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "UWE", "Safety_Loop" },
            { UI.WaitTalk },

            { UI.UserTalk, "ID_NAM_UWE",  "ID_M_4F1_E4030_060_EK2" },
            { Sound.PlayVoice, "E4030_060_EK2" },          --♪
            { Chara.ChangeAction, "UWE", "Safety_Loop_Talk" },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "UWE", "Safety_Loop" },
            { UI.WaitTalk },

            { Chara.SetIK, "ELF", "UWE", "b_C_Head", 5 },
            { UI.UserTalk, "ID_NAM_UWE",  "ID_M_4F1_E4030_070_EK2" },
            { Sound.PlayVoice, "E4030_070_EK2" },          --♪
            { Chara.ChangeAction, "UWE", "Safety_Loop_Talk" },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "UWE", "Safety_Loop" },
            { UI.WaitTalk },

            { UI.SelectAutoTalk, "ID_NAM_UWE",  "ID_M_4F1_E4030_080_EK2", 4.0, "ID_CHO_02810" },
            { Sound.PlayVoice, "E4030_080_EK2" },          --♪
            { Chara.ChangeAction, "UWE", "Safety_Loop_Talk" },
            { Wait, 2.0 },
            { Chara.UnsetIK, "ELF", 5 },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "UWE", "Safety_Loop" },
            { UI.WaitTalk },

            { BranchTalkEx, "A23" },
        },
    },
    {
        Name = "B3a",
        Idle = {
            { ChangeTable, "Active" },
        },
        Active = {
            { Chara.SetIK, "Player", "UWE", "b_C_Head", 5 },
            { Chara.SetIK, "UWE", "Player", "b_C_Head", 5 },

            { UI.UserTalk, "ID_NAM_UWE",  "ID_M_4F1_E4030_050_EK2" },
            { Sound.PlayVoice, "E4030_050_EK2" },          --♪
            { Chara.ChangeAction, "UWE", "Safety_Loop_Talk" },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "UWE", "Safety_Loop" },
            { UI.WaitTalk },

            { UI.UserTalk, "ID_NAM_UWE",  "ID_M_4F1_E4030_060_EK2" },
            { Sound.PlayVoice, "E4030_060_EK2" },          --♪
            { Chara.ChangeAction, "UWE", "Safety_Loop_Talk" },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "UWE", "Safety_Loop" },
            { UI.WaitTalk },

            { Chara.SetIK, "ELF", "UWE", "b_C_Head", 5 },
            { UI.UserTalk, "ID_NAM_UWE",  "ID_M_4F1_E4030_070_EK2" },
            { Sound.PlayVoice, "E4030_070_EK2" },          --♪
            { Chara.ChangeAction, "UWE", "Safety_Loop_Talk" },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "UWE", "Safety_Loop" },
            { UI.WaitTalk },

            { UI.SelectAutoTalk, "ID_NAM_UWE",  "ID_M_4F1_E4030_080_EK2", 4.0, "ID_CHO_02810", "ID_CHO_02820" },
            { Sound.PlayVoice, "E4030_080_EK2" },          --♪
            { Chara.ChangeAction, "UWE", "Safety_Loop_Talk" },
            { Wait, 2.0 },
            { Chara.UnsetIK, "ELF", 5 },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "UWE", "Safety_Loop" },
            { UI.WaitTalk },

            { BranchTalkEx, "A23", "B3a" },
        },
    },
    {
        Name = "B23",
        Idle = {
            { ChangeTable, "Active" },
        },
        Active = {
            { Chara.SetIK, "Player", "UWE", "b_C_Head", 5 },
            { Chara.SetIK, "UWE", "Player", "b_C_Head", 5 },

            { UI.UserTalk, "ID_NAM_UWE",  "ID_M_4F1_E4030_050_EK2" },
            { Sound.PlayVoice, "E4030_050_EK2" },          --♪
            { Chara.ChangeAction, "UWE", "Safety_Loop_Talk" },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "UWE", "Safety_Loop" },
            { UI.WaitTalk },

            { UI.UserTalk, "ID_NAM_UWE",  "ID_M_4F1_E4030_060_EK2" },
            { Sound.PlayVoice, "E4030_060_EK2" },          --♪
            { Chara.ChangeAction, "UWE", "Safety_Loop_Talk" },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "UWE", "Safety_Loop" },
            { UI.WaitTalk },

            { Chara.SetIK, "ELF", "UWE", "b_C_Head", 5 },
            { UI.UserTalk, "ID_NAM_UWE",  "ID_M_4F1_E4030_070_EK2" },
            { Sound.PlayVoice, "E4030_070_EK2" },          --♪
            { Chara.ChangeAction, "UWE", "Safety_Loop_Talk" },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "UWE", "Safety_Loop" },
            { UI.WaitTalk },

            { UI.AutoTalk, "ID_NAM_UWE",  "ID_M_4F1_E4030_080_EK2", 4.0 },
            { Sound.PlayVoice, "E4030_080_EK2" },          --♪
            { Chara.ChangeAction, "UWE", "Safety_Loop_Talk" },
            { Wait, 2.0 },
            { Chara.UnsetIK, "ELF", 5 },
            { Sound.WaitVoice },
            { Chara.ChangeAction, "UWE", "Safety_Loop" },
            { UI.WaitTalk },

            { ContinueEvent, "C" },
        },
    },
    {
        Name = "C",
        Idle = {
            { ChangeTable, "Active" },
        },
        Active = {
            { StartImmediate },
            { Camera.SetRawPosition, 3.21252, 1.52649, 13.96692 },         --=> P + uwe + elf(front)
            { Camera.SetRawInterest, 15.07374, 3.19548, 26.11741 },
            { Chara.SetRotateY, "Player", 200 },
            { Chara.SetRotateY, "ELF", 205 },
            { Chara.UnsetIK, "Player", 5 },
            { Chara.UnsetIK, "UWE", 5 },
            { Chara.UnsetIK, "ELF", 5 },
            { EndImmediate },

            { Sound.PlaySystemSE, 86 },

            { StartImmediate },
            { Camera.SetRawPosition, 4.48702, 1.70582, 15.27249, 10 },         --=> P + uwe + elf(front) :move
            { Camera.SetRawInterest, 16.34823, 3.37481, 27.42299, 10 },
            { EndImmediate },
            
            { UI.AutoTalk, "ID_NAM_UWE",  "ID_M_4F1_E4030_090_EK2", 3.5 },
            { Sound.PlayVoice, "E4030_090_EK2" },          --♪

            { Chara.ChangeAction, "UWE", "Safety_End" },
            { Wait, 0.1 },
            { Chara.ChangeAction, "Player", "Safety_End" },
            { Wait, 0.1 },
            { Chara.ChangeAction, "ELF", "Safety_End" },
            { Chara.ChangeAction, "BEA", "Safety_End" },
            
            { Chara.ChangeAction, "MAT", "Safety_End" },
            { Chara.ChangeAction, "CAR", "Safety_End" },
            { Chara.ChangeAction, "NAT", "Safety_End" },
            { Chara.ChangeAction, "MAR", "Safety_End" },
            { Chara.ChangeAction, "HAL", "Safety_End" },
            { Chara.ChangeAction, "ANN", "Safety_End" },
            { Chara.ChangeAction, "BIL", "Safety_End" },
            { Chara.ChangeAction, "NIN", "Safety_End" },
            { Chara.ChangeAction, "SIZ", "Safety_End" },
            { Chara.ChangeAction, "KAI", "Safety_End" },
            { Chara.ChangeAction, "SER", "Safety_End" },
            
            { Chara.ChangeAction, "Accessory", "Safety_End" },
            { Chara.ChangeAction, "A_UWE", "Safety_End" },
            { Chara.ChangeAction, "A_ELF", "Safety_End" },
            { Chara.ChangeAction, "A_BEA", "Safety_End" },
            
            { Chara.ChangeAction, "A_MAT", "Safety_End" },
            { Chara.ChangeAction, "A_CAR", "Safety_End" },
            { Chara.ChangeAction, "A_NAT", "Safety_End" },
            { Chara.ChangeAction, "A_MAR", "Safety_End" },
            { Chara.ChangeAction, "A_HAL", "Safety_End" },
            { Chara.ChangeAction, "A_ANN", "Safety_End" },
            { Chara.ChangeAction, "A_BIL", "Safety_End" },
            { Chara.ChangeAction, "A_NIN", "Safety_End" },
            { Chara.ChangeAction, "A_SIZ", "Safety_End" },
            { Chara.ChangeAction, "A_KAI", "Safety_End" },
            { Chara.ChangeAction, "A_SER", "Safety_End" },

            { Camera.WaitPositionMoving },

            { StartImmediate },
            { Camera.SetRawPosition, 4.96207, 1.77267, 15.75912, 100 },         --=> P + uwe + elf(front) :move
            { Camera.SetRawInterest, 16.82326, 3.44165, 27.90962, 100 },
            { EndImmediate },

            { Wait, 2.0 },

            { Scenario.FadeOut, "Black", 30 },
            { Scenario.WaitFade },

            { Chara.SetBattlePosition, "Player", 03 },
            { Chara.SetBattlePosition, "UWE", 04 },
            { Chara.SetBattlePosition, "ELF", 05 },

            { Chara.SetRotateY, "Player", -134 },
            { Chara.SetRotateY, "UWE", -134 },
            { Chara.SetRotateY, "ELF", -134 },

            { Camera.Deactivate },
            { Camera.DisableDOF },


--レムリア咎人用カット

--            { Chara.ChangeAction, "Human_01", "Safety_Loop" },			--レムリア咎人アイドリング開始
--            { Chara.ChangeAction, "Android_01", "Safety_Loop" },			--レムリアアクセサリアイドリング開始
--            { Chara.ChangeAction, "Human_02", "Safety_Loop" },				--レムリア咎人アイドリング開始
--            { Chara.ChangeAction, "Android_02", "Safety_Loop" },			--レムリアアクセサリアイドリング開始
--            { Chara.ChangeAction, "Human_03", "Safety_Loop" },				--レムリア咎人アイドリング開始
--            { Chara.ChangeAction, "Android_03", "Safety_Loop" },			--レムリアアクセサリアイドリング開始
--            { Chara.ChangeAction, "Human_00", "Safety_Loop" },				--レムリア咎人アイドリング開始
--            { Chara.ChangeAction, "Android_00", "Safety_Loop" },			--レムリアアクセサリアイドリング開始

--            { StartImmediate },											--カメラ移動開始（レムリア咎人用）
--            { Camera.SetRawPosition,  -20.25,  0.80, -20.25, 0 },			--座標
--            { Camera.SetRawInterest,  -23.60,  0.80, -21.60, 0 },			--注視点
--            { Camera.Activate },											--カメラ有効化
--            { EndImmediate },

--            { Camera.WaitPositionMoving },								--カメラ移動完了待ち（つなぎ）

--            { Scenario.FadeIn, "Black", 30, 0 },							--ボランティア開始時ブラックアウト（つなぎ）

--            { Sound.PlaySystemSE, 80 },									--冒頭ＳＥ発生

--            { StartImmediate },											--カメラ移動終了（レムリア咎人用）
--            { Camera.SetRawPosition,  -20.25,  1.00, -20.25, 210 },		--座標
--            { Camera.SetRawInterest,  -23.60,  0.60, -21.60, 210 },		--注視点
--            { EndImmediate },

--            { Wait, 0.5 },												--テキスト＆ボイス待ち時間(sec)

--            { UI.AutoTalk, "ACC", "ID_S10001_0113", 5.5 },				--テキスト表示
--            { Sound.PlayAccVoice, "ID_S10001_0113", "Accessory" },		--ボイス再生

--            { Wait, 1.5 },												--待ち時間(sec)

--            { Chara.ChangeAction, "Human_01", "Safety_End" },				--ザナドゥ咎人モーション切り替え
--            { Sound.PlaySystemSE, 88 },									--近距離武器構えＳＥ発生

--            { Wait, 4.1 },												--待ち時間(sec)

--            { Scenario.FadeOut, "Black",  8, 1 },							--カメラ切り替えブラックアウト
--            { Scenario.WaitFade },


--レムリアアクセサリ用カット

--            { StartImmediate },											--カメラ移動開始（レムリアアクセサリ用）
--            { Camera.SetRawPosition,  -23.00,  1.20, -28.10,  0 },		--座標
--            { Camera.SetRawInterest,  -25.10,  1.10, -31.00,  0 },		--注視点
--            { Camera.Activate },											--カメラ有効化
--            { EndImmediate },

--            { Camera.WaitPositionMoving },								--カメラ移動完了待ち（つなぎ）

--            { Scenario.FadeIn, "Black",   8, 2 },							--ブラックアウト終了

--          { Sound.PlaySystemSE, 84 },										--中間ＳＥ発生

--            { StartImmediate },											--カメラ移動終了（レムリアアクセサリ用）
--            { Camera.SetRawPosition,  -22.90,  1.00, -27.70,  210 },		--座標
--            { Camera.SetRawInterest,  -25.10,  1.10, -31.00,  210 },		--注視点
--            { EndImmediate },

--            { Wait, 1.0 },												--待ち時間(sec)

--            { Chara.ChangeAction, "Android_01", "Safety_End" },			--ザナドゥアクセサリモーション切り替え
--            { Sound.PlaySystemSE, 87 },									--近距離武器構えＳＥ発生

--            { Wait, 3.1 },												--待ち時間(sec)

--            { Scenario.FadeOut, "Black",   12, 0 },						--カメラ切り替えブラックアウト
--            { Scenario.WaitFade },


--全景用カット

            { Sound.PlayBGM, "011_Ba_Pre_BattleCamera" },					--BGM再生

            { Chara.ChangeAction, "Human_01", "Safety_Loop" },				--レムリア咎人アイドリング開始
            { Chara.ChangeAction, "Android_01", "Safety_Loop" },			--レムリアアクセサリアイドリング開始
            { Chara.ChangeAction, "Human_02", "Safety_Loop" },				--レムリア咎人アイドリング開始
            { Chara.ChangeAction, "Android_02", "Safety_Loop" },			--レムリアアクセサリアイドリング開始
            { Chara.ChangeAction, "Human_03", "Safety_Loop" },				--レムリア咎人アイドリング開始
            { Chara.ChangeAction, "Android_03", "Safety_Loop" },			--レムリアアクセサリアイドリング開始
            { Chara.ChangeAction, "Human_00", "Safety_Loop" },				--レムリア咎人アイドリング開始
            { Chara.ChangeAction, "Android_00", "Safety_Loop" },			--レムリアアクセサリアイドリング開始

            { StartImmediate },												--カメラ移動開始（全景用）
            { Camera.SetRawPosition,   -26.50,  0.60, -11.00, 0 },			--座標
            { Camera.SetRawInterest,   -30.00,  1.20, -13.60, 0 },			--注視点
            { Camera.Activate },											--カメラ有効化
            { EndImmediate },

            { Camera.WaitPositionMoving },									--カメラ移動完了待ち（つなぎ）

            { Scenario.FadeIn, "Black", 30, 0 },							--ボランティア開始時ブラックアウト（つなぎ）

            { Sound.PlaySystemSE, 80 },										--冒頭ＳＥ発生

            { StartImmediate },												--カメラ移動終了（全景用）
            { Camera.SetRawPosition,   -3.00,  1.00,  00.00, 270 },			--座標
            { Camera.SetRawInterest,  -20.50,  2.40, -13.60, 270 },			--注視点
            { EndImmediate },

            { Wait, 0.5 },													--待ち時間(sec)

            { Chara.ChangeAction, "Human_02", "Safety_End" },				--ザナドゥ咎人モーション切り替え

            { UI.AutoTalk, "ACC", "ID_S10001_0300", 7.0 },					--テキスト表示
            { Sound.PlayAccVoice, "ID_S10001_0300", "Accessory" },			--ボイス再生

            { Wait, 1.0 },													--待ち時間(sec)

            { Chara.ChangeAction, "Android_02", "Safety_End" },				--ザナドゥアクセサリモーション切り替え

            { Wait, 1.0 },													--カメラ切り替え待ち時間(sec)

            { Chara.ChangeAction, "Human_03", "Safety_End" },				--ザナドゥ咎人モーション切り替え

            { Wait, 0.5 },													--カメラ切り替え待ち時間(sec)

            { Chara.ChangeAction, "Android_03", "Safety_End" },				--ザナドゥアクセサリモーション切り替え

            { Wait, 0.5 },													--カメラ切り替え待ち時間(sec)

            { Chara.ChangeAction, "Human_01", "Safety_End" },				--ザナドゥ咎人モーション切り替え

            { Wait, 0.5 },													--カメラ切り替え待ち時間(sec)

            { Chara.ChangeAction, "Android_01", "Safety_End" },				--ザナドゥアクセサリモーション切り替え

            { Sound.PlaySystemSE, 85 },										--終了ＳＥ発生

            { Wait, 1.2 },													--カメラ切り替え待ち時間(sec)

            { Chara.ChangeAction, "Human_00", "Safety_End" },				--ザナドゥ咎人モーション切り替え

            { Wait, 0.5 },													--カメラ切り替え待ち時間(sec)

            { Chara.ChangeAction, "Android_00", "Safety_End" },				--ザナドゥアクセサリモーション切り替え


            { Wait, 1.9 },													--カメラ切り替え待ち時間(sec)

            { Scenario.FadeOut, "White", 16 },								--ブラックアウト開始
            { Scenario.WaitFade },

            { Camera.Deactivate },

            { Sound.StopBGM },												--BGM終了


        -- バトル開始前デモ
            { Scenario.BattleEventEnd },
            { ChangeEvent, "EndEvent"},
        },
    },
    {
        Name = "EndEvent",
        Idle = {
            { EndImmediate },
        },
        Active = {
        },
    },
    -- ========================= オンラインカメラ =========================
    {
        -- アナウンスカメラ
        Name = "PreBattleKeyOnline",
        Idle = {
        },
        Active = {

            { Scenario.FadeOut, "White", 1, 0 },							--ボランティア開始時ホワイトアウト（つなぎ）

            { Sound.PlayBGM, "011_Ba_Pre_BattleCamera" },					--BGM再生

--全景用カット

            { Chara.ChangeAction, "Human_01", "Safety_Loop" },				--レムリア咎人アイドリング開始
            { Chara.ChangeAction, "Android_01", "Safety_Loop" },			--レムリアアクセサリアイドリング開始
            { Chara.ChangeAction, "Human_02", "Safety_Loop" },				--レムリア咎人アイドリング開始
            { Chara.ChangeAction, "Android_02", "Safety_Loop" },			--レムリアアクセサリアイドリング開始
            { Chara.ChangeAction, "Human_03", "Safety_Loop" },				--レムリア咎人アイドリング開始
            { Chara.ChangeAction, "Android_03", "Safety_Loop" },			--レムリアアクセサリアイドリング開始
            { Chara.ChangeAction, "Human_00", "Safety_Loop" },				--レムリア咎人アイドリング開始
            { Chara.ChangeAction, "Android_00", "Safety_Loop" },			--レムリアアクセサリアイドリング開始

            { StartImmediate },												--カメラ移動開始（全景用）
            { Camera.SetRawPosition,   -26.50,  0.60, -11.00, 0 },			--座標
            { Camera.SetRawInterest,   -30.00,  1.20, -13.60, 0 },			--注視点
            { Camera.Activate },											--カメラ有効化
            { EndImmediate },

            { Camera.WaitPositionMoving },									--カメラ移動完了待ち（つなぎ）

            { Scenario.FadeIn, "Black", 30, 0 },							--ボランティア開始時ブラックアウト（つなぎ）

            { Sound.PlaySystemSE, 80 },										--冒頭ＳＥ発生

            { StartImmediate },												--カメラ移動終了（全景用）
            { Camera.SetRawPosition,   -3.00,  1.00,  00.00, 270 },			--座標
            { Camera.SetRawInterest,  -20.50,  2.40, -13.60, 270 },			--注視点
            { EndImmediate },

            { Wait, 0.5 },													--待ち時間(sec)

            { Chara.ChangeAction, "Human_02", "Safety_End" },				--ザナドゥ咎人モーション切り替え

            { UI.AutoTalk, "ACC", "ID_S10001_0300", 7.0 },					--テキスト表示
            { Sound.PlayAccVoice, "ID_S10001_0300", "Accessory" },			--ボイス再生

            { Wait, 1.0 },													--待ち時間(sec)

            { Chara.ChangeAction, "Android_02", "Safety_End" },				--ザナドゥアクセサリモーション切り替え

            { Wait, 1.0 },													--カメラ切り替え待ち時間(sec)

            { Chara.ChangeAction, "Human_03", "Safety_End" },				--ザナドゥ咎人モーション切り替え

            { Wait, 0.5 },													--カメラ切り替え待ち時間(sec)

            { Chara.ChangeAction, "Android_03", "Safety_End" },				--ザナドゥアクセサリモーション切り替え

            { Wait, 0.5 },													--カメラ切り替え待ち時間(sec)

            { Chara.ChangeAction, "Human_01", "Safety_End" },				--ザナドゥ咎人モーション切り替え

            { Wait, 0.5 },													--カメラ切り替え待ち時間(sec)

            { Chara.ChangeAction, "Android_01", "Safety_End" },				--ザナドゥアクセサリモーション切り替え

            { Sound.PlaySystemSE, 85 },										--終了ＳＥ発生

            { Wait, 1.2 },													--カメラ切り替え待ち時間(sec)

            { Chara.ChangeAction, "Human_00", "Safety_End" },				--ザナドゥ咎人モーション切り替え

            { Wait, 0.5 },													--カメラ切り替え待ち時間(sec)

            { Chara.ChangeAction, "Android_00", "Safety_End" },				--ザナドゥアクセサリモーション切り替え


            { Wait, 1.9 },													--カメラ切り替え待ち時間(sec)

            { Scenario.FadeOut, "White", 16 },								--ブラックアウト開始
            { Scenario.WaitFade },

            { Camera.Deactivate },

            { Sound.StopBGM },												--BGM終了


        -- バトル開始前デモ
            { Scenario.BattleEventEnd },
            { ChangeEvent, "EndEvent"},
        },
    },
    {
        Name = "FixEvent",
        Idle = {
        },
        Active = {
            { StartImmediate },
            { Chara.UnsetIK, "Player" },
            { Chara.UnsetIK, "UWE" },
            { Chara.UnsetIK, "ELF" },
            { Chara.ResetBlendThreshold, "UWE" },
            { Chara.ResetBlendThreshold, "ELF" },
            { Chara.SetBattlePosition, "Player", 03 },
            { Chara.SetBattlePosition, "UWE", 04 },
            { Chara.SetBattlePosition, "ELF", 05 },
            { Chara.SetRotateY, "Player", -134 },
            { Chara.SetRotateY, "UWE", -134 },
            { Chara.SetRotateY, "ELF", -134 },
            { Scenario.BattleEventEnd },
            { Camera.Deactivate },
            { Camera.DisableDOF },
            { Camera.ResetFovY },
            { Sound.StopBGM },												--BGM終了
            { EndImmediate },
            { ChangeEvent, "Idle"},
        },
    },
    {
        Name = "FixEventOnline",
        Idle = {
        },
        Active = {
            { StartImmediate },
            { Camera.Deactivate },											--Mantis7418に対応
            { Sound.StopBGM },												--BGM終了
            { EndImmediate },
            { ChangeEvent, "Idle"},
        },
    },
};


-- イベントシーケンスを反映
set_seq_table(sequence_table);
