1 // Intro sequence for this tutorial.
2 
3 #appendto Sequence
4 
Intro_Init(int for_plr)5 public func Intro_Init(int for_plr)
6 {
7 	this.plr = for_plr;
8 	this.head = Dialogue->FindByName("VillageHead")->GetDialogueTarget();
9 	this.homeless = Dialogue->FindByName("Homeless")->GetDialogueTarget();
10 	this.plr_clonk = GetCrew(for_plr);
11 
12 	this.head->PushActionSpeed("Walk", 38);
13 	this.plr_clonk->PushActionSpeed("Walk", 38);
14 	if (this.head.ActMap == this.head.Prototype.ActMap)
15 		this.head.ActMap = new this.head.ActMap {};
16 	if (this.head.ActMap.Walk == this.head.Prototype.ActMap.Walk)
17 		this.head.ActMap.Walk = new this.head.ActMap.Walk {};
18 	this.head.ActMap.Walk.Speed = 38;
19 	if (this.plr_clonk.ActMap == this.plr_clonk.Prototype.ActMap)
20 		this.plr_clonk.ActMap = new this.plr_clonk.ActMap {};
21 	if (this.plr_clonk.ActMap.Walk == this.plr_clonk.Prototype.ActMap.Walk)
22 		this.plr_clonk.ActMap.Walk = new this.plr_clonk.ActMap.Walk {};
23 	this.plr_clonk.ActMap.Walk.Speed = 38;
24 	return true;
25 }
26 
Intro_JoinPlayer(int plr)27 public func Intro_JoinPlayer(int plr)
28 {
29 	SetPlayerZoomByViewRange(plr, 240, nil, PLRZOOM_Direct | PLRZOOM_Set);
30 	return;
31 }
32 
Intro_Start()33 public func Intro_Start()
34 {
35 	this.head->SetCommand("MoveTo", nil, this.head->GetX() + 180, this.head->GetY());
36 	this.plr_clonk->SetCommand("MoveTo", nil, this.plr_clonk->GetX() + 180, this.plr_clonk->GetY());
37 	return ScheduleNext(4);
38 }
39 
Intro_1()40 public func Intro_1()
41 {
42 	MessageBox("$MsgVillageHeadAnnoyed$", this.plr_clonk, this.head, this.plr, true);
43 	return ScheduleNext(160);
44 }
45 
Intro_2()46 public func Intro_2()
47 {
48 	MessageBox("$MsgClonkHowToStrike$", this.plr_clonk, this.plr_clonk, this.plr, true);
49 	return ScheduleNext(108);
50 }
51 
Intro_3()52 public func Intro_3()
53 {
54 	MessageBox("$MsgVillageHeadOrganize$", this.plr_clonk, this.head, this.plr, true);
55 	return ScheduleNext(172);
56 }
57 
Intro_4()58 public func Intro_4()
59 {
60 	MessageBox("$MsgClonkPoorGuy$", this.plr_clonk, this.plr_clonk, this.plr, true);
61 	return ScheduleNext(140);
62 }
63 
Intro_5()64 public func Intro_5()
65 {
66 	MessageBox("$MsgHomelessRobbers$", this.plr_clonk, this.homeless, this.plr, true);
67 	return ScheduleNext(140);
68 }
69 
Intro_6()70 public func Intro_6()
71 {
72 	MessageBox("$MsgClonkWhere$", this.plr_clonk, this.plr_clonk, this.plr, true);
73 	return ScheduleNext(140);
74 }
75 
Intro_7()76 public func Intro_7()
77 {
78 	MessageBox("$MsgHomelessLocation$", this.plr_clonk, this.homeless, this.plr, true);
79 	return ScheduleNext(140);
80 }
81 
Intro_8()82 public func Intro_8()
83 {
84 	MessageBox(Format("$MsgVillageHeadTeachThem$", this.plr_clonk->GetName()), this.plr_clonk, this.head, this.plr, true);
85 	return ScheduleNext(140);
86 }
87 
Intro_9()88 public func Intro_9()
89 {
90 	MessageBox("$MsgHomelessHappy$", this.plr_clonk, this.homeless, this.plr, true);
91 	return ScheduleNext(80);
92 }
93 
Intro_10()94 public func Intro_10()
95 {
96 	return Stop();
97 }
98 
Intro_Stop()99 public func Intro_Stop()
100 {
101 	GameCall("OnIntroSequenceFinished", this.plr);
102 	this.plr_clonk.ActMap.Walk.Speed = Clonk.ActMap.Walk.Speed;
103 	this.head.ActMap.Walk.Speed = Clonk.ActMap.Walk.Speed;
104 	SetPlayerZoomByViewRange(this.for_plr, 400, nil, PLRZOOM_Direct | PLRZOOM_Set);
105 	return true;
106 }