// town script for town 46: Road (intro cutscene town 2)

begintownscript;

variables;

int stepsnd,y;

body;

beginstate INIT_STATE;
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;

if (get_flag(46,0) == 0) {

// *** start cutscene ***

// Party placement and explanation

	set_total_visibility(1);

	force_view_center(22,39); // Place party right (just to be sure)
	relocate_character(0,22,39);
	relocate_character(1,22,40);
	relocate_character(2,22,41);
	relocate_character(3,22,42);
	set_character_facing(0,0);
	set_character_facing(1,0);
	set_character_facing(2,0);
	set_character_facing(3,0);
	force_instant_terrain_redraw();

	message_dialog("You have walked for five minutes through these woods, when you start hearing a crowd. They sound like people, but you can never be too sure.","You walk silently on.");
	
// Party walks

	march_party(22,38);
	force_view_center(22,38);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	y = 37;
	
	while (y > 28) {
			march_party(22,y);
			force_view_center(22,y);
			if(stepsnd == 0){
					stepsnd = 1;
					play_sound(49);
				}
				else{
					stepsnd = 0;
					play_sound(50);
				}
			force_instant_terrain_redraw();
			pause(5);
			
			y = y - 1;
			}

// Party stops walking, looks at crowd.

	pause(10);
	
	message_dialog("You halt and look. The crowd consists of ordinary people. You have a closer look, and you spot the inn-lady!","What's more, you also see the woman that ran past you, and owners of the shops you searched for. You wonder what is happening. When you decide to inquire with the people, a man comes to the crowd.");

// Man walks to crowd

	force_view_center(20,17);
	force_instant_terrain_redraw();
	pause(10);
	
	y = 12;
	
	while (y < 23) {
			relocate_character(20,y,18);
			play_sound(49);
			force_instant_terrain_redraw();
			pause(5);
			
			y = y + 1;
			}
	
// Man speaks

	pause(20);
	
	text_bubble_on_char(20,"You are all here");
	force_instant_terrain_redraw();
	pause(15);
	
	text_bubble_on_char(20,"");
	text_bubble_on_char(20,"Good");
	force_instant_terrain_redraw();
	pause(15);
	
	text_bubble_on_char(20,"");
	text_bubble_on_char(20,"We must go quickly");
	force_instant_terrain_redraw();
	pause(15);
	
	text_bubble_on_char(20,"");
	text_bubble_on_char(20,"I heard worrying news");
	force_instant_terrain_redraw();
	pause(15);
	
	text_bubble_on_char(20,"");
	text_bubble_on_char(20,"They are coming closer to us!");
	force_instant_terrain_redraw();
	pause(15);
	
	text_bubble_on_char(20,"");
	text_bubble_on_char(20,"Let us go now!");
	force_instant_terrain_redraw();
	pause(15);
	
	text_bubble_on_char(20,"");
	force_instant_terrain_redraw();
	pause(15);

	message_dialog("The people seem very frightened. You wonder who these _they_ are. It is certainly too late to ask now. You decide to go on as soon as the crowd has left.","");
	
	text_bubble_on_char(20,"I'll take the lead");
	force_instant_terrain_redraw();
	pause(15);
	
	text_bubble_on_char(20,"");
	text_bubble_on_char(20,"We'll try to reach the woods of Ventus");
	force_instant_terrain_redraw();
	pause(15);
	
	text_bubble_on_char(20,"");
	force_instant_terrain_redraw();
	pause(15);
	
	set_character_facing(20,2);
	pause(10);
	
	text_bubble_on_char(20,"Cum auxilio te, domus");
	force_instant_terrain_redraw();
	pause(15);
	
	message_dialog("The man shakes his head, and the crowd starts moving.","");
	
// Move man + crowd (man is first line, crowd is other 14 lines)

	relocate_character(20,22,18); // man
	
	relocate_character(13,24,18);
	
	relocate_character(15,25,20);
	relocate_character(9,25,19);
	relocate_character(6,25,18);
	relocate_character(19,25,16);
	
	relocate_character(11,26,20);
	relocate_character(10,26,18);
	
	relocate_character(16,27,21); // mother
	relocate_character(17,27,19);
	relocate_character(8,27,18);
	relocate_character(14,27,17);
	
	relocate_character(18,28,21); // father
	relocate_character(12,28,17);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(2);
	
	relocate_character(7,27,20); // child
	play_sound(49);
	force_instant_terrain_redraw();
	pause(3);
	
	
	relocate_character(20,21,18); // man
	
	relocate_character(13,23,18);
	
	relocate_character(15,24,20);
	relocate_character(9,24,19);
	relocate_character(6,24,18);
	relocate_character(19,24,16);
	
	relocate_character(11,25,20);
	relocate_character(10,25,18);
	
	relocate_character(16,26,21); // mother
	relocate_character(17,26,19);
	relocate_character(8,26,18);
	relocate_character(14,26,17);
	
	relocate_character(18,27,21); // father
	relocate_character(12,27,17);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(4);
	
	relocate_character(7,26,20); // child
	play_sound(49);
	text_bubble_on_char(20,"");
	force_instant_terrain_redraw();
	pause(1);

	relocate_character(20,20,18); // man
	
	relocate_character(13,22,18);

	relocate_character(15,23,20);
	relocate_character(9,23,19);
	relocate_character(6,23,18);
	relocate_character(19,23,16);
	
	relocate_character(11,24,20);
	relocate_character(10,24,18);
	
	relocate_character(16,25,21); // mother
	relocate_character(17,25,19);
	relocate_character(8,25,18);
	relocate_character(14,25,17);
	
	relocate_character(18,26,21); // father
	relocate_character(12,26,17);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);

	relocate_character(20,19,18); // man
	
	relocate_character(13,21,18);

	relocate_character(15,22,20);
	relocate_character(9,22,19);
	relocate_character(6,22,18);
	relocate_character(19,22,16);
	
	relocate_character(11,23,20);
	relocate_character(10,23,18);
	
	relocate_character(16,24,21); // mother
	relocate_character(17,24,19);
	relocate_character(8,24,18);
	relocate_character(14,24,17);
	
	relocate_character(18,25,21); // father
	relocate_character(12,25,17);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(1);
	
	relocate_character(7,25,20); // child
	play_sound(49);
	force_instant_terrain_redraw();
	pause(4);

	relocate_character(20,18,18); // man
	
	relocate_character(13,20,18);
	
	relocate_character(15,21,20);
	relocate_character(9,21,19);
	relocate_character(6,21,18);
	relocate_character(19,21,16);
	
	relocate_character(11,22,20);
	relocate_character(10,22,18);
	
	relocate_character(16,23,21); // mother
	relocate_character(17,23,19);
	relocate_character(8,23,18);
	relocate_character(14,23,17);
	
	relocate_character(18,24,21); // father
	relocate_character(12,24,17);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(3);

	relocate_character(7,24,20); // child
	play_sound(49);
	force_instant_terrain_redraw();
	pause(2);


	relocate_character(20,17,18); // man
	
	relocate_character(13,19,18);

	relocate_character(15,20,20);
	relocate_character(9,20,19);
	relocate_character(6,20,18);
	relocate_character(19,20,16);
	
	relocate_character(11,21,20);
	relocate_character(10,21,18);
	
	relocate_character(16,22,21); // mother
	relocate_character(17,22,19);
	relocate_character(8,22,18);
	relocate_character(14,22,17);
	
	relocate_character(18,23,21); // father
	relocate_character(12,23,17);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	
	relocate_character(20,16,18); // man
	
	relocate_character(13,18,18);

	relocate_character(15,19,20);
	relocate_character(9,19,19);
	relocate_character(6,19,18);
	relocate_character(19,19,16);
	
	relocate_character(11,20,20);
	relocate_character(10,20,18);
	
	relocate_character(16,21,21); // mother
	relocate_character(17,21,19);
	relocate_character(8,21,18);
	relocate_character(14,21,17);
	
	relocate_character(18,22,21); // father
	relocate_character(12,22,17);
	play_sound(49);
	force_instant_terrain_redraw();
	
	relocate_character(7,23,20); // child
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);

	
	relocate_character(20,15,18); // man
	
	relocate_character(13,17,18);

	relocate_character(15,18,20);
	relocate_character(9,18,19);
	relocate_character(6,18,18);
	relocate_character(19,18,16);
	
	relocate_character(11,19,20);
	relocate_character(10,19,18);
	
	relocate_character(16,20,21); // mother
	relocate_character(17,20,19);
	relocate_character(8,20,18);
	relocate_character(14,20,17);
	
	relocate_character(18,21,21); // father
	relocate_character(12,21,17);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(2);
	
	relocate_character(7,22,20); // child
	play_sound(49);
	force_instant_terrain_redraw();
	pause(3);


	relocate_character(20,14,18); // man
	
	relocate_character(13,16,18);

	relocate_character(15,17,20);
	relocate_character(9,17,19);
	relocate_character(6,17,18);
	relocate_character(19,17,16);
	
	relocate_character(11,18,20);
	relocate_character(10,18,18);
	
	relocate_character(16,19,21); // mother
	relocate_character(17,19,19);
	relocate_character(8,19,18);
	relocate_character(14,19,17);
	
	relocate_character(18,20,21); // father
	relocate_character(12,20,17);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(4);
	
	text_bubble_on_char(7,"Mommy!"); // Child cries for mother
	relocate_character(7,21,20); // child
	play_sound(49);
	force_instant_terrain_redraw();
	pause(1);


	set_character_facing(16,6); // mother turns around
	set_character_facing(18,6); // father turns around
	
	
	relocate_character(20,13,18); // man
	
	relocate_character(13,15,18);

	relocate_character(15,16,20);
	relocate_character(9,16,19);
	relocate_character(6,16,18);
	relocate_character(19,16,16);
	
	relocate_character(11,17,20);
	relocate_character(10,17,18);
	
	relocate_character(17,18,19);
	relocate_character(8,18,18);
	relocate_character(14,18,17);
	
	relocate_character(12,19,17);
	
	text_bubble_on_char(16,"Grab our hands!"); // parents talk to child
	text_bubble_on_char(18,"Grab our hands!");
	
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	
	relocate_character(20,12,18); // man
	
	relocate_character(13,14,18);

	relocate_character(15,15,20);
	relocate_character(9,15,19);
	relocate_character(6,15,18);
	relocate_character(19,15,16);
	
	relocate_character(11,16,20);
	relocate_character(10,16,18);
	
	relocate_character(17,17,19);
	relocate_character(8,17,18);
	relocate_character(14,17,17);
	
	relocate_character(12,18,17);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(1);
	
	relocate_character(7,20,20); // child
	play_sound(49);
	force_instant_terrain_redraw();
	pause(2);
	
	text_bubble_on_char(7,"");
	force_instant_terrain_redraw();
	pause(2);
	
	
	relocate_character(20,11,18); // man
	
	relocate_character(13,13,18);

	relocate_character(15,14,20);
	relocate_character(9,14,19);
	relocate_character(6,14,18);
	relocate_character(19,14,16);
	
	relocate_character(11,15,20);
	relocate_character(10,15,18);
	
	relocate_character(17,16,19);
	relocate_character(8,16,18);
	relocate_character(14,16,17);
	
	relocate_character(12,17,17);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(3);
	
	set_character_facing(16,2); // mother turns around
	set_character_facing(18,2); // father turns around
	text_bubble_on_char(16,"");
	text_bubble_on_char(18,"");
	relocate_character(7,19,20); // child
	play_sound(49);
	force_instant_terrain_redraw();
	pause(2);
	
	
	relocate_character(20,10,18); // man
	
	relocate_character(13,12,18);

	relocate_character(15,13,20);
	relocate_character(9,13,19);
	relocate_character(6,13,18);
	relocate_character(19,13,16);
	
	relocate_character(11,14,20);
	relocate_character(10,14,18);
	
	relocate_character(17,15,19);
	relocate_character(8,15,18);
	relocate_character(14,15,17);
	
	relocate_character(12,16,17);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(3);
	
	relocate_character(7,18,20); // child
	relocate_character(16,18,21); // mother
	relocate_character(18,19,21); // father
	play_sound(49);
	force_instant_terrain_redraw();
	pause(2);
	
	
	relocate_character(20,9,18); // man
	
	relocate_character(13,11,18);

	relocate_character(15,12,20);
	relocate_character(9,12,19);
	relocate_character(6,12,18);
	relocate_character(19,12,16);
	
	relocate_character(11,13,20);
	relocate_character(10,13,18);
	
	relocate_character(17,14,19);
	relocate_character(8,14,18);
	relocate_character(14,14,17);
	
	relocate_character(12,15,17);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(3);
	
	relocate_character(7,17,20); // child
	relocate_character(16,17,21); // mother
	relocate_character(18,18,21); // father
	play_sound(49);
	force_instant_terrain_redraw();
	pause(2);
	
	
	relocate_character(20,8,18); // man
	
	relocate_character(13,10,18);

	relocate_character(15,11,20);
	relocate_character(9,11,19);
	relocate_character(6,11,18);
	relocate_character(19,11,16);
	
	relocate_character(11,12,20);
	relocate_character(10,12,18);
	
	relocate_character(17,13,19);
	relocate_character(8,13,18);
	relocate_character(14,13,17);
	
	relocate_character(12,14,17);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(3);
	
	relocate_character(7,16,20); // child
	relocate_character(16,16,21); // mother
	relocate_character(18,17,21); // father
	play_sound(49);
	force_instant_terrain_redraw();
	pause(2);
	
	
	relocate_character(20,7,18); // man
	
	relocate_character(13,9,18);

	relocate_character(15,10,20);
	relocate_character(9,10,19);
	relocate_character(6,10,18);
	relocate_character(19,10,16);
	
	relocate_character(11,11,20);
	relocate_character(10,11,18);
	
	relocate_character(17,12,19);
	relocate_character(8,12,18);
	relocate_character(14,12,17);
	
	relocate_character(12,13,17);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(3);
	
	relocate_character(7,15,20); // child
	relocate_character(16,15,21); // mother
	relocate_character(18,16,21); // father
	play_sound(49);
	force_instant_terrain_redraw();
	pause(2);
	
	
	relocate_character(20,6,18); // man
	
	relocate_character(13,8,18);

	relocate_character(15,9,20);
	relocate_character(9,9,19);
	relocate_character(6,9,18);
	relocate_character(19,9,16);
	
	relocate_character(11,10,20);
	relocate_character(10,10,18);
	
	relocate_character(17,11,19);
	relocate_character(8,11,18);
	relocate_character(14,11,17);
	
	relocate_character(12,12,17);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(3);
	
	relocate_character(7,14,20); // child
	relocate_character(16,14,21); // mother
	relocate_character(18,15,21); // father
	play_sound(49);
	force_instant_terrain_redraw();
	pause(2);

// back to party

	force_view_center(22,28);
	force_instant_terrain_redraw();
	pause(10);
	
	march_party(22,27);
	force_view_center(22,27);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	march_party(23,26);
	force_view_center(23,26);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	march_party(24,25);
	force_view_center(24,25);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	march_party(25,24);
	force_view_center(25,24);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	march_party(26,23);
	force_view_center(26,23);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	march_party(27,22);
	force_view_center(27,22);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	march_party(27,21);
	force_view_center(27,21);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	march_party(27,20);
	force_view_center(27,20);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	march_party(27,19);
	force_view_center(27,19);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	march_party(27,18);
	force_view_center(27,18);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	march_party(27,17);
	force_view_center(27,17);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	set_character_facing(0,2);
	set_character_facing(1,2);
	set_character_facing(2,2);
	set_character_facing(3,2);
	force_instant_terrain_redraw();
	pause(15);

// Explain

	message_dialog("You spend some time looking at the leaving crowd. You will probably never find out what it is these fled for. You don't really mind, anyway. You decide to leave the forest and go to Riverrod province, where you will rest.","");

// Move party

	pause(5);

	set_character_facing(0,0);
	set_character_facing(1,0);
	set_character_facing(2,0);
	set_character_facing(3,0);
	force_instant_terrain_redraw();
	pause(5);

	march_party(27,16);
	force_view_center(27,16);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	march_party(27,15);
	force_view_center(27,15);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	march_party(27,14);
	force_view_center(27,14);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	march_party(27,13);
	force_view_center(27,13);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	march_party(27,12);
	force_view_center(27,12);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);
	
	march_party(27,11);
	force_view_center(27,11);
	play_sound(49);
	force_instant_terrain_redraw();
	pause(5);

// tell party what to do

	message_dialog("To proceed with the cutscene, please keep walking north until you hit a special rectangle and are moved to another town.","");
	set_flag(46,0,1);
	}

	set_total_visibility(0);

break;

beginstate 10;

// Explain

	message_dialog("You walk on until you reach the borders of Riverrod province. For some reason, the guards look awfully nervous. Despite that, they seem to let you pass as normal.","You walk on, taking a nice, stone road. However, in front of you, a problem arises. You see a village. It's burning.");

// Show picture

	large_draw_pic_dialog(555,"");

// Move party

	move_to_new_town(47,24,43);
break;

beginstate 11;
message_dialog("That's the wrong way. You should be following the road to the north, to Riverrod, not the road to the west.","");
block_entry(1);
break;

beginstate 12;
message_dialog("That's the wrong way. You should be following the road to the north, to Riverrod, not go back to Merrylhide.","");
block_entry(1);
break;