1 |
if (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;
}
} () && keyboard_multicheck_pressed(0) && (!interacted_with)) |
2 |
{ |
3 |
scene = 0 |
4 |
interacted_with = true |
5 |
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
} () |
6 |
} |
7 |
if interacted_with |
8 |
{ |
9 |
if (scene == 0) |
10 |
{ |
11 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
12 |
with (msg) |
13 |
{ |
14 |
ch_msg = 2 |
15 |
ch[1] = "Yes" |
16 |
ch[2] = "No" |
17 |
message[0] = "* (The shelf is lined with# several books, some educational,# some recreational.)" |
18 |
message[1] = "* (A book titled \"Gemstone Fever\"# catches your eye.)" |
19 |
message[2] = "* (Read it?)" |
20 |
if (outcome == 1) |
21 |
{ |
22 |
instance_destroy() |
23 |
other.scene = 1 |
24 |
return; |
25 |
} |
26 |
if (outcome == 2) |
27 |
{ |
28 |
global.dialogue_open = false |
29 |
other.interacted_with = false |
30 |
scr_cutscene_end() |
31 |
} |
32 |
} |
33 |
} |
34 |
if (scene == 1) |
35 |
{ |
36 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
37 |
with (msg) |
38 |
{ |
39 |
col_modif[0] = 65535 |
40 |
col_modif[1] = 16711680 |
41 |
col_modif[2] = 65280 |
42 |
col_modif[3] = 16711935 |
43 |
color = true |
44 |
message[0] = "* The Underground has been the# home to thousands of gemstones," |
45 |
message[1] = "* Yet only four types have been# discovered." |
46 |
message[2] = "* The Swelterstone - Hue, Yellow" |
47 |
message_col[2][0] = " The Swelterstone " |
48 |
message[3] = "* This stone emits immense heat,# sum depending on its size." |
49 |
message[4] = "* It is also the brightest stone,# frequently used to illuminate# various Underground locations." |
50 |
message[5] = "* The Glacialstone - Hue, Blue" |
51 |
message_col[5][1] = " The Glacialstone" |
52 |
message[6] = "* Opposite of the Swelterstone;# emmits a frigid temperature." |
53 |
message[7] = "* This stone is abundant in# cooler areas such as Snowdin# and Waterfall." |
54 |
message[8] = "* The Aromaticstone - Hue, Green" |
55 |
message_col[8][2] = " The Aromaticstone" |
56 |
message[9] = "* This rare stone smells like# apples. That is all." |
57 |
message[10] = "* The Pinkstone - Hue, in# the name." |
58 |
message_col[10][3] = " The Pinkstone" |
59 |
message[11] = "* No trait for this stone has# been discovered as of# publication." |
60 |
message[12] = "* (You sift through the book and# catch a couple more facts.)" |
61 |
} |
62 |
if (!global.dialogue_open) |
63 |
{ |
64 |
scene++ |
65 |
timer = 10 |
66 |
} |
67 |
} |
68 |
if (scene == 2) |
69 |
{ |
70 |
if (!scr_timerscr_timerfunction scr_timer() //gml_Script_scr_timer
{
if (timer > 0)
{
timer--
return false;
}
else
return true;
} ()) |
71 |
return; |
72 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
73 |
with (msg) |
74 |
{ |
75 |
message[0] = "* With the temperature stones# having higher quantities in# certain areas," |
76 |
message[1] = "* They can be a large factor in# determining their location's# climate." |
77 |
} |
78 |
if (!global.dialogue_open) |
79 |
{ |
80 |
scene++ |
81 |
timer = 10 |
82 |
} |
83 |
} |
84 |
if (scene == 3) |
85 |
{ |
86 |
if (!scr_timerscr_timerfunction scr_timer() //gml_Script_scr_timer
{
if (timer > 0)
{
timer--
return false;
}
else
return true;
} ()) |
87 |
return; |
88 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
89 |
with (msg) |
90 |
{ |
91 |
message[0] = "* Gemstones do not have much# monetary worth within the# Underground Economy." |
92 |
message[1] = "* Instead, they are often# utilized for their traits,# jewelry, or other decoration." |
93 |
} |
94 |
if (!global.dialogue_open) |
95 |
{ |
96 |
scene++ |
97 |
timer = 10 |
98 |
} |
99 |
} |
100 |
if (scene == 4) |
101 |
{ |
102 |
if (!scr_timerscr_timerfunction scr_timer() //gml_Script_scr_timer
{
if (timer > 0)
{
timer--
return false;
}
else
return true;
} ()) |
103 |
return; |
104 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
105 |
with (msg) |
106 |
{ |
107 |
message[0] = "* The largest gemstone to be# discovered is located in the# Dunes." |
108 |
message[1] = "* It is approximated to be as big# as 10,000 hardhats!" |
109 |
message[2] = "* (You close the book and put it# back.)" |
110 |
message[3] = "* (You are now dizzy with# gemstone fever.)" |
111 |
} |
112 |
if (!global.dialogue_open) |
113 |
{ |
114 |
scr_cutscene_end() |
115 |
interacted_with = false |
116 |
} |
117 |
} |
118 |
} |