1 |
if live_call() |
2 |
return global.live_result; |
3 |
depth = (-y) |
4 |
interact = 0 |
5 |
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) |
6 |
interact = 1 |
7 |
if (instance_exists(obj_dialogue) && is_talking == true) |
8 |
{ |
9 |
if (obj_dialogue.cutoff == string_length(obj_dialogue.message[obj_dialogue.message_current])) |
10 |
{ |
11 |
image_speed = 0 |
12 |
image_index = 0 |
13 |
} |
14 |
else |
15 |
image_speed = 0.2 |
16 |
} |
17 |
else |
18 |
{ |
19 |
image_speed = 0 |
20 |
is_talking = false |
21 |
} |
22 |
if (ds_map_find_value(global.npc_map, npc_id) != npc_flag) |
23 |
ds_map_replace(global.npc_map, npc_id, npc_flag) |
24 |
if interact |
25 |
snow_cutscene = true |
26 |
if snow_cutscene |
27 |
{ |
28 |
if (npc_flag == 0) |
29 |
{ |
30 |
switch scene |
31 |
{ |
32 |
case 0: |
33 |
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
} () |
34 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
35 |
with (msg) |
36 |
{ |
37 |
message[0] = "* (It's a snowcastle!#* How... cute?)" |
38 |
message[1] = "* (You open the doors.)" |
39 |
} |
40 |
if (global.dialogue_open == false) |
41 |
{ |
42 |
audio_play_sound(snd_snowcastle_door_1, 1, 0) |
43 |
scene++ |
44 |
} |
45 |
break |
46 |
case 1: |
47 |
image_speed = 0.4 |
48 |
if (image_index >= 12) |
49 |
{ |
50 |
image_speed = 0 |
51 |
scene++ |
52 |
} |
53 |
break |
54 |
case 2: |
55 |
npc_flag += 1 |
56 |
scene = 0 |
57 |
scr_cutscene_end() |
58 |
snow_cutscene = false |
59 |
break |
60 |
} |
61 |
|
62 |
} |
63 |
else if (npc_flag == 1) |
64 |
{ |
65 |
switch scene |
66 |
{ |
67 |
case 0: |
68 |
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
} () |
69 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
70 |
with (msg) |
71 |
message[0] = "* (You open the drawbridge.)" |
72 |
if (global.dialogue_open == false) |
73 |
{ |
74 |
audio_play_sound(snd_snowcastle_door_2, 1, 0) |
75 |
scene++ |
76 |
} |
77 |
break |
78 |
case 1: |
79 |
image_speed = 0.4 |
80 |
if (image_index >= (image_number - 1)) |
81 |
{ |
82 |
image_index = image_number - 1 |
83 |
image_speed = 0 |
84 |
scene++ |
85 |
} |
86 |
break |
87 |
case 2: |
88 |
scr_cutscene_end() |
89 |
scene = 0 |
90 |
npc_flag += 1 |
91 |
snow_cutscene = false |
92 |
break |
93 |
} |
94 |
|
95 |
} |
96 |
else if (npc_flag == 2) |
97 |
{ |
98 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
99 |
with (msg) |
100 |
message[0] = "* (Your head hurts too much to# keep going.)" |
101 |
if (global.dialogue_open == false) |
102 |
{ |
103 |
npc_flag = 3 |
104 |
snow_cutscene = false |
105 |
} |
106 |
} |
107 |
else if (npc_flag == 3) |
108 |
{ |
109 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
110 |
with (msg) |
111 |
message[0] = "* (It's a snowcastles.)" |
112 |
if (global.dialogue_open == false) |
113 |
snow_cutscene = false |
114 |
} |
115 |
} |