1 |
interact = 0 |
2 |
if (keyboard_multicheck_pressed(0) && scr_interactscr_interactfunction scr_interact() //gml_Script_scr_interact
{
if (distance_to_object(obj_pl) < 20 && obj_pl.state == gml_Script_scr_normal_state)
{
var pl_dir = obj_pl.direction
var pl_x = 0
var pl_y = 0
var check_distance_x = 0
var check_distance_y = 0
switch pl_dir
{
case 0:
pl_x = obj_pl.bbox_right
pl_y = obj_pl.bbox_top + 1
check_distance_x = 20
break
case 180:
pl_x = obj_pl.bbox_left
pl_y = obj_pl.bbox_top + 1
check_distance_x = -20
break
case 90:
pl_x = obj_pl.x
pl_y = obj_pl.bbox_top
check_distance_y = -20
break
case 270:
pl_x = obj_pl.x
pl_y = obj_pl.bbox_bottom
check_distance_y = 20
break
}
if collision_line_first(pl_x, pl_y, (pl_x + check_distance_x), (pl_y + check_distance_y), id, false, false)
return true;
}
} () == true) |
3 |
interact = 1 |
4 |
if (scene < 7) |
5 |
{ |
6 |
if (instance_exists(obj_dialogue) && is_talking == true) |
7 |
{ |
8 |
if (obj_dialogue.cutoff == string_length(obj_dialogue.message[obj_dialogue.message_current])) |
9 |
{ |
10 |
image_speed = 0 |
11 |
image_index = 0 |
12 |
} |
13 |
else |
14 |
image_speed = 0.2 |
15 |
} |
16 |
else |
17 |
{ |
18 |
image_speed = 0 |
19 |
is_talking = false |
20 |
} |
21 |
depth = (-y) |
22 |
} |
23 |
switch scene |
24 |
{ |
25 |
case 0: |
26 |
if interact |
27 |
{ |
28 |
scr_cutscene_startscr_cutscene_startfunction scr_cutscene_start() //gml_Script_scr_cutscene_start
{
global.cutscene = true
obj_pl.state = gml_Script_scr_frozen_state
obj_pl.image_index = 0
obj_pl.image_speed = 0
} () |
29 |
cutscene_advance() |
30 |
} |
31 |
break |
32 |
case 1: |
33 |
cutscene_dialogue() |
34 |
with (msg) |
35 |
{ |
36 |
talker[0] = other.object_index |
37 |
if (global.mail_count < 2) |
38 |
{ |
39 |
message[0] = "* Oh hey, I recognize you!" |
40 |
message[1] = "* Ummm... wait, don't tell me!# It's... Uh..." |
41 |
message[2] = "* Clover! " |
42 |
message[3] = "* Yeah, I remember you! " |
43 |
message[4] = "* I delivered your intro letter!" |
44 |
} |
45 |
else if (global.mail_count >= 2 && global.mail_count < 5) |
46 |
{ |
47 |
message[0] = "* You're Clover? Am I right? " |
48 |
message[1] = "* Your name has come up once or# twice!" |
49 |
} |
50 |
else |
51 |
{ |
52 |
message[0] = "* Clover, right? Your name comes# up all the time!" |
53 |
message[1] = "* You must be real popular!" |
54 |
} |
55 |
} |
56 |
break |
57 |
case 2: |
58 |
cutscene_dialogue() |
59 |
with (msg) |
60 |
{ |
61 |
talker[0] = other.object_index |
62 |
message[0] = "* Hm? You look confused..." |
63 |
message[1] = "* Oh right, I'm not rhyming!" |
64 |
message[2] = "* Yeah, that's just a company# policy." |
65 |
message[3] = "* It gets a little tiresome# sometimes." |
66 |
message[4] = "* But other than that, I have no# complaints!" |
67 |
message[5] = "* It's a great job! Wouldn't# trade it for the world!" |
68 |
message[6] = "* I'm a little worried, though." |
69 |
message[7] = "* These days, those fancy \"cell# phones\" are all the rage!" |
70 |
message[8] = "* I don't know how long the mail# service will-" |
71 |
} |
72 |
break |
73 |
case 3: |
74 |
cutscene_audio_fade(obj_radio.current_song, 0, 200, 0.1, false) |
75 |
break |
76 |
case 4: |
77 |
cutscene_sfx_play(snd_bell_ring_cow, 0.75) |
78 |
break |
79 |
case 5: |
80 |
cutscene_wait(2) |
81 |
break |
82 |
case 6: |
83 |
if cutscene_dialogue() |
84 |
y -= 10 |
85 |
with (msg) |
86 |
{ |
87 |
talker[0] = other.object_index |
88 |
message[0] = "* Oh me! Oh my! My break's come# to an end!" |
89 |
message[1] = "* See you next time there's# letters to send!" |
90 |
} |
91 |
break |
92 |
case 7: |
93 |
cutscene_sfx_play(snd_slide_whistle, 0.75) |
94 |
break |
95 |
case 8: |
96 |
depth = (-room_height) |
97 |
if (sprite_index != spr_mail_whale_yellow) |
98 |
sprite_index = spr_mail_whale_yellow |
99 |
image_speed = 0.2 |
100 |
if (vspeed > -2) |
101 |
vspeed -= 0.1 |
102 |
if (y < 20) |
103 |
cutscene_advance() |
104 |
break |
105 |
case 9: |
106 |
global.dunes_flag_ext[5] = 1 |
107 |
cutscene_audio_fade(obj_radio.current_song, 1, 300, 0, true) |
108 |
instance_destroy() |
109 |
scr_cutscene_end() |
110 |
break |
111 |
} |