[logic]
active = sr_idle@scene_1_spawn

[sr_idle@scene_1_spawn]
;lvl
on_info = {+mar_lvl_sim} sr_idle@test, {+mar_intro_start} sr_idle@scene_1_time %=disable_ui =spawn_object(mar_intro_lebedev_1:mar_intro_scene_1_lebedev:0:249.3) =spawn_object(mar_intro_kalancha:mar_intro_scene_1_kalancha:0:163.0) =spawn_object(mar_intro_actor:mar_intro_scene_1_actor:0:0.0) =disable_level_changer(311:mar_disabled_level_changer) =disable_level_changer(312:mar_disabled_level_changer) =disable_level_changer(313:mar_disabled_level_changer)%

[sr_idle@scene_1_time]
on_timer = 40000 | sr_idle@scene_2_spawn %=run_postprocess(mar_fade)%
;lvl
on_info = {+mar_lvl_sim} sr_idle@test

;-----------------------------------------------------------------------

[sr_idle@scene_2_spawn]
on_timer = 2500 | sr_idle@scene_2_sit %+mar_intro_scene_1_end =spawn_object(mar_intro_lebedev_2:mar_intro_scene_2_lebedev:0:270.0) =update_weather(true) =play_sound(mar_intro_getting_up)%
;lvl
on_info = {+mar_lvl_sim} sr_idle@test

[sr_idle@scene_2_sit]
on_timer = 14000 | sr_idle@scene_2_talk
;lvl
on_info = {+mar_lvl_sim} sr_idle@test

[sr_idle@scene_2_talk]
;lvl
on_info = {+mar_lvl_sim} sr_idle@test, {+mar_intro_scene_2_end} sr_idle@scene_2_end

[sr_idle@scene_2_end]
;lvl
on_info = {+mar_lvl_sim} sr_idle@test, {+mar_intro_scene_2_cameff_end} sr_idle@scene_3_barman_wait_1 %=enable_ui =give_inited_task(storyline:mar_story_talk_with_barman:csky)%

;-----------------------------------------------------------------------

[sr_idle@scene_3_barman_wait_1]
on_info = {-mar_autosave} sr_idle@scene_3_barman_wait_2 %+mar_autosave =autosave_game%, sr_idle@scene_3_barman_wait_2

[sr_idle@scene_3_barman_wait_2]
on_info = {+mar_intro_talk_with_barman_radio_timer} sr_idle@scene_3_barman_time

[sr_idle@scene_3_barman_time]
on_timer = 40000 | %=play_sound(mar_csky_leader_to_barman_0:csky:mar_csky_commander_name)%
;2nd iteration
on_info = {+mar_intro_talk_with_barman_done} sr_idle@scene_3_commander_wait %=enable_ui%, {+mar_intro_talk_with_barman_break} %=play_sound(mar_csky_leader_to_barman_0:csky:mar_csky_commander_name)%
on_signal = sound_end | sr_idle@scene_3_commander_wait %=give_inited_task(storyline:mar_story_talk_with_commander_1:csky) +mar_intro_talk_with_barman_done +mar_intro_talk_with_commander_1_started =enable_ui%

;-----------------------------------------------------------------------

[sr_idle@scene_3_commander_wait]
on_info = {+mar_intro_talk_with_commander_1_radio_timer} sr_idle@scene_3_commander_time

[sr_idle@scene_3_commander_time]
on_timer = 26500 | %=play_sound(mar_csky_forpost_sos:csky)%
;2nd iteration
on_info = {+mar_intro_talk_with_commander_1_radio_played} sr_idle@scene_3_commander_catch, {+mar_intro_talk_with_commander_1_break} %=play_sound(mar_csky_forpost_sos:csky)%
on_signal = sound_end | sr_idle@scene_3_commander_catch %+mar_intro_talk_with_commander_1_radio_played%

[sr_idle@scene_3_commander_catch]
on_info = {+mar_intro_talk_with_trader_started} sr_idle@scene_3_commander_ui %=give_inited_task(storyline:mar_story_talk_with_trader:csky) =give_inited_task(storyline:mar_tutorial_help:csky)%

[sr_idle@scene_3_commander_ui]
on_info = {!talking} sr_idle@tutorial_trader_wait %=enable_ui%

;-----------------------------------------------------------------------

[sr_idle@tutorial_trader_wait]
on_info = {+mar_intro_talk_with_guide_started} sr_idle@tutorial_guide_wait %=give_inited_task(storyline:mar_story_talk_with_guide:csky)%

;-----------------------------------------------------------------------

[sr_idle@tutorial_guide_wait]
;lvl
on_info = {+mar_intro_talk_with_guide_done -mar_lvl_sim} sr_idle@tutorial_guide_time_1 %=disable_ui =run_postprocess(mar_fade)%, {+mar_intro_talk_with_guide_done +mar_lvl_sim} sr_idle@tutorial_tower_wait

[sr_idle@tutorial_guide_time_1]
on_timer = 2500 | sr_idle@tutorial_guide_time_2 %+mar_intro_talk_with_guide_end =teleport_actor(mar_actor_teleport_tutorial_walk:mar_actor_teleport_tutorial_look)%
;=spawn_object(mar_csky_tutorial_man:mar_tutorial_man_walk)

[sr_idle@tutorial_guide_time_2]
on_timer = 2500 | sr_idle@tutorial_tower_wait %=activate_weapon_slot(2) =enable_ui%

[sr_idle@tutorial_tower_wait]
on_info = {+mar_tutorial_tower_top_started} sr_idle@tutorial_kill_boars_wait %=give_inited_task(storyline:mar_tutorial_tower_top:csky)%, {=distance_to_obj_ge(306:260)} sr_idle@tutorial_surge

[sr_idle@tutorial_kill_boars_wait]
on_info = {+mar_tutorial_kill_boars_done -mar_tutorial_tower_top_done} sr_idle@tutorial_surge %+mar_tutorial_tower_top_reversed +mar_tutorial_help_done%, {+mar_tutorial_kill_boars_started} sr_idle@tutorial_dead_boars_wait %=give_inited_task(storyline:mar_tutorial_kill_boars:csky)%
on_timer = 40000 | sr_idle@tutorial_surge

[sr_idle@tutorial_dead_boars_wait]
on_info = {+mar_tutorial_kill_boars_done} sr_idle@tutorial_surge %+mar_tutorial_help_done%
on_timer = 8000 | sr_idle@tutorial_surge

[sr_idle@tutorial_surge]
on_timer = 1000 | sr_idle@tutorial_warn_wait %=activate_surge(6)% 
on_info = {+mar_tutorial_help_reversed} sr_idle@tutorial_warn_wait ;2nd iteration

[sr_idle@tutorial_warn_wait]
on_timer = 5000 | %=play_sound(mar_csky_leader_starting_surge:csky:mar_csky_commander_name)%
on_signal = sound_end | sr_idle@tutorial_final_wait %+mar_tutorial_surge_warned +mar_tutorial_kill_boars_reversed +mar_tutorial_help_reversed +mar_tutorial_tower_top_reversed%
on_info = {+mar_tutorial_surge_warned} sr_idle@tutorial_final_wait ;2nd iteration

[sr_idle@tutorial_final_wait]
on_info = {+mar_tutorial_return_to_base_reversed} sr_idle@tutorial_final_time_1

[sr_idle@tutorial_final_time_1]
on_timer = 4500 | sr_idle@tutorial_final_time_2 %=update_weather(true) =teleport_actor(mar_intro_scene_2_actor_walk:mar_intro_scene_2_actor_look) +mar_tutorial_returned_to_base%
on_info = {+mar_tutorial_returned_to_base} sr_idle@tutorial_final_time_2 ;2nd iteration

[sr_idle@tutorial_final_time_2]
on_timer = 4000 | sr_idle@scene_4_signal %=run_cam_effector_global(scenario_cam\Marsh\camera_mar_04_on_foot:3) +mar_tutorial_returned_got_on_feet%
on_info = {+mar_tutorial_returned_got_on_feet} sr_idle@scene_4_signal

;-----------------------------------------------------------------------

[sr_idle@scene_4_signal]
on_signal = cameff_end | sr_idle@scene_4_wait_1 %=enable_ui =give_inited_task(storyline:mar_story_talk_with_commander_2:csky) +mar_intro_talk_with_commander_2_started%
;%=enable_ui_elements(all)
on_info = {+mar_intro_talk_with_commander_2_started} sr_idle@scene_4_wait_1 %=give_inited_task(storyline:mar_story_talk_with_commander_2:csky)% ;2nd iteration

[sr_idle@scene_4_wait_1]
on_info = {+mar_intro_talk_with_commander_2_decide} sr_idle@scene_4_wait_2 %=give_inited_task(storyline:mar_story_talk_with_commander_3:csky)%, {+mar_intro_talk_with_commander_3_done} sr_idle@scene_4_wait_2

[sr_idle@scene_4_wait_2]
on_info = {+mar_intro_talk_with_commander_3_done} sr_idle@scene_4_wait_3 %=set_actor_faction(csky) =give_inited_task(storyline:mar_story_talk_with_sidorovych:csky)%

[sr_idle@scene_4_wait_3]
on_info = {+mar_intro_talk_with_commander_3_control} sr_idle@expansion_0_go_to_marsh_wait %=give_inited_task(storyline:mar_story_go_to_marsh:csky)%
;sr_idle@expansion_0_tactic_wait
;%=give_inited_task(storyline:mar_story_take_control_over_marsh:csky)%

;-----------------------------------------------------------------------

;[sr_idle@expansion_0_tactic_wait]
;on_info = {+mar_intro_talk_with_tactic_done} sr_idle@expansion_0_go_to_marsh_wait

[sr_idle@expansion_0_go_to_marsh_wait]
on_info = {+mar_story_go_to_marsh_done} sr_idle@expansion_0_main

;-----------------------------------------------------------------------

[sr_idle@expansion_0_main]
on_info = {-mar_csky_expansion_changed =is_csky_at_expansion_0} %+mar_csky_expansion_changed =give_inited_task(storyline:mar_story_empower_csky:csky) =update_faction_brain(csky)%, {!is_csky_at_expansion_0} sr_idle@expansion_1_main %-mar_csky_expansion_changed +mar_story_empower_csky_done%

[sr_idle@expansion_1_main]
on_info = {-mar_csky_expansion_changed =is_csky_at_expansion_1} %+mar_csky_expansion_changed =update_faction_brain(csky)%, {=is_csky_at_expansion_0} sr_idle@expansion_0_main %-mar_csky_expansion_changed -mar_story_empower_csky_done%, {!is_csky_at_expansion_1} sr_idle@expansion_2_main %-mar_csky_expansion_changed%

[sr_idle@expansion_2_main]
on_info = {-mar_csky_expansion_changed =is_csky_at_expansion_2} %+mar_csky_expansion_changed =update_faction_brain(csky)%, {=is_csky_at_expansion_3_or_higher} sr_idle@expansion_3_main %-mar_csky_expansion_changed%, {!is_csky_at_expansion_2} sr_idle@expansion_1_main %-mar_csky_expansion_changed%

[sr_idle@expansion_3_main]
on_info = {-mar_csky_expansion_changed =is_csky_at_expansion_3_or_higher} %+mar_csky_expansion_changed =give_inited_task(storyline:mar_story_go_to_escape:csky) =update_faction_brain(csky)%, {!is_csky_at_expansion_3_or_higher} sr_idle@expansion_2_main %-mar_csky_expansion_changed%, {+mar_story_go_to_escape_done} sr_idle@level_changer_to_agroprom %=enable_level_changer(311) =enable_level_changer(312)%

;-----------------------------------------------------------------------

[sr_idle@level_changer_to_agroprom]
on_info = {+agr_actor_on_agroprom} sr_idle@end_section %=enable_level_changer(313)%

[sr_idle@end_section]

;-----------------------------------------------------------------------

[sr_idle@test]
on_info = sr_idle@scene_3_barman_wait_1 %=stop_cam_effector(1) =stop_cam_effector(2) =stop_cam_effector(3) =stop_cam_effector(4) =update_weather(true) =enable_ui =give_inited_task(storyline:mar_story_talk_with_barman:csky)%