1 |
palette_index = obj_pl.palette_index; |
2 |
shader_on = obj_pl.shader_on; |
3 |
switch (scene) |
4 |
{ |
5 |
case 1: |
6 |
y += fly_speed; |
7 |
if (y > 0) |
8 |
mail_whale_shadow_alpha += 0.025; |
9 |
if (y > mail_whale_y_target && fly_speed > 0) |
10 |
fly_speed -= 0.2; |
11 |
else if (fly_speed == 0) |
12 |
scene = 2; |
13 |
break; |
14 |
case 2: |
15 |
if (global.player_can_travel == true) |
16 |
{ |
17 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
18 |
with (msg) |
19 |
{ |
20 |
portrait = false; |
21 |
message[0] = "* Hello - greetings - hip hip# hooray!"; |
22 |
message[1] = "* What can I do for you today?"; |
23 |
ch_msg = 1; |
24 |
ch[1] = "Mail"; |
25 |
ch[2] = "Travel"; |
26 |
if (outcome == 1) |
27 |
other.mail_whale_mail_noloop = true; |
28 |
if (outcome == 2) |
29 |
other.mail_whale_travel_noloop = true; |
30 |
if (other.mail_whale_mail_noloop) |
31 |
{ |
32 |
message[2] = "* You have a watch? If you don't,# that's fine!"; |
33 |
message[3] = "* Cause you know what time it is?# Mail time! Mail time! "; |
34 |
if (ds_list_empty(global.mail_unclaimed_list)) |
35 |
{ |
36 |
message[4] = "* Do you have mail to claim?"; |
37 |
message[5] = "* Let's take a look. You don't!# What a shame."; |
38 |
message[6] = "* If you want to check again,# just ring the bell!"; |
39 |
message[7] = "* Until we meet again; I bid you# farewell!"; |
40 |
other.scene++; |
41 |
} |
42 |
else |
43 |
{ |
44 |
portrait = false; |
45 |
message[4] = "* (You received mail!)"; |
46 |
message[5] = "* I truly hope you like your# mail!"; |
47 |
message[6] = "* As for me, I must set sail!"; |
48 |
if (message_current == 4) |
49 |
{ |
50 |
audio_play_sound(snd_success, 1, 0); |
51 |
scr_mail_claimscr_mail_claimfunction scr_mail_claim()
{
var old_list = global.mail_unclaimed_list;
for (var i = 0; i < ds_list_size(old_list); i++)
{
scr_mail_add(ds_list_find_value(old_list, i));
global.mail_count += 1;
}
ds_list_clear(global.mail_unclaimed_list);
} (); |
52 |
other.scene = 3; |
53 |
} |
54 |
} |
55 |
} |
56 |
if (other.mail_whale_travel_noloop) |
57 |
{ |
58 |
message[2] = "* Where in the world would you# like to fly?"; |
59 |
message[3] = "* Just choose the place and the# UGPS sign!"; |
60 |
global.cutscene = true; |
61 |
other.scene = 4; |
62 |
} |
63 |
} |
64 |
} |
65 |
else |
66 |
{ |
67 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
68 |
if (ds_list_empty(global.mail_unclaimed_list)) |
69 |
{ |
70 |
with (msg) |
71 |
{ |
72 |
portrait = false; |
73 |
message[0] = "* Hello again, friend! Do you# have mail to claim?"; |
74 |
message[1] = "* Let's take a look. You don't!# What a shame."; |
75 |
message[2] = "* If you want to check again,# just ring the bell!"; |
76 |
message[3] = "* Until we meet again; I bid you# farewell!"; |
77 |
} |
78 |
scene++; |
79 |
} |
80 |
else |
81 |
{ |
82 |
with (msg) |
83 |
{ |
84 |
portrait = false; |
85 |
message[0] = "* You have a watch? If you don't,# that's fine!"; |
86 |
message[1] = "* Cause you know what time it is?# Mail time! Mail time! "; |
87 |
message[2] = "* (You received mail!)"; |
88 |
message[3] = "* I truly hope you like your# mail!"; |
89 |
message[4] = "* As for me, I must set sail!"; |
90 |
if (message_current == 2) |
91 |
{ |
92 |
audio_play_sound(snd_success, 1, 0); |
93 |
scr_mail_claimscr_mail_claimfunction scr_mail_claim()
{
var old_list = global.mail_unclaimed_list;
for (var i = 0; i < ds_list_size(old_list); i++)
{
scr_mail_add(ds_list_find_value(old_list, i));
global.mail_count += 1;
}
ds_list_clear(global.mail_unclaimed_list);
} (); |
94 |
other.scene++; |
95 |
} |
96 |
} |
97 |
} |
98 |
} |
99 |
break; |
100 |
case 3: |
101 |
if (instance_exists(obj_dialogue)) |
102 |
exit; |
103 |
y -= fly_speed; |
104 |
mail_whale_shadow_alpha -= 0.05; |
105 |
if (y > ystart && fly_speed < 2) |
106 |
fly_speed += 0.2; |
107 |
if (y <= ystart) |
108 |
{ |
109 |
instance_destroy(); |
110 |
scr_cutscene_end(); |
111 |
instance_destroy(); |
112 |
} |
113 |
break; |
114 |
case 4: |
115 |
if (instance_exists(obj_dialogue)) |
116 |
exit; |
117 |
instance_create(0, 0, obj_fast_travel_menu); |
118 |
scene++; |
119 |
break; |
120 |
case 5: |
121 |
if (instance_exists(obj_fast_travel_menu)) |
122 |
exit; |
123 |
if (global.fast_travel_point == "None") |
124 |
{ |
125 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
126 |
with (msg) |
127 |
message[0] = "* OOF."; |
128 |
scene = 3; |
129 |
} |
130 |
else |
131 |
{ |
132 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
133 |
with (msg) |
134 |
{ |
135 |
message[0] = "* A very fine choice, I cannot# scoff!"; |
136 |
message[1] = "* Hop into my basket and we'll# takeoff!"; |
137 |
} |
138 |
scene = 6; |
139 |
} |
140 |
break; |
141 |
case 6: |
142 |
if (global.dialogue_open) |
143 |
exit; |
144 |
depth = -y - 10; |
145 |
if (!instance_exists(obj_player_npc)) |
146 |
{ |
147 |
instance_create(obj_pl.x, obj_pl.y, obj_player_npc); |
148 |
} |
149 |
else |
150 |
{ |
151 |
var yy = y + 40; |
152 |
if (room == rm_steamworks_32) |
153 |
yy = y + 20; |
154 |
cutscene_npc_walk(1168, x, yy, 2, "nothing", "up"); |
155 |
} |
156 |
break; |
157 |
case 7: |
158 |
cutscene_wait(0.5); |
159 |
break; |
160 |
case 8: |
161 |
audio_play_sound(snd_playerjump, 1, 0); |
162 |
with (obj_doorway) |
163 |
instance_destroy(); |
164 |
obj_player_npc.image_alpha = 0; |
165 |
sprite_index = spr_mail_whale_basket_clover_yellow; |
166 |
cutscene_advance(); |
167 |
break; |
168 |
case 9: |
169 |
cutscene_wait(1); |
170 |
break; |
171 |
case 10: |
172 |
depth = -room_height + 1; |
173 |
y -= fly_speed; |
174 |
mail_whale_shadow_alpha -= 0.05; |
175 |
if (y > -40 && fly_speed < 2) |
176 |
fly_speed += 0.2; |
177 |
if (y <= (camera_get_view_y(view_camera[0]) - 40)) |
178 |
event_user(1); |
179 |
break; |
180 |
} |