1 |
event_inherited() |
2 |
if (interact && audio_is_playing(song)) |
3 |
{ |
4 |
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
} () |
5 |
waiter = 1 |
6 |
} |
7 |
if (waiter == 1) |
8 |
{ |
9 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
10 |
if (!instance_exists(obj_dialoguebox_dummy)) |
11 |
instance_create(x, y, obj_dialoguebox_dummy) |
12 |
talk = 1 |
13 |
with (msg) |
14 |
{ |
15 |
portrait = false |
16 |
ch[1] = "Yes" |
17 |
ch[2] = "No" |
18 |
switch other.npc_flag |
19 |
{ |
20 |
case 0: |
21 |
message[0] = "* How's it hangin'?" |
22 |
message[1] = "* The name's Rodney. I'm the# leader of our little band here." |
23 |
message[2] = "* We travel all around the# Underground performing for the# monsters." |
24 |
message[3] = "* This resort is a regular gig." |
25 |
message[4] = "* Care to hear a tune?" |
26 |
ch_msg = 4 |
27 |
break |
28 |
case 1: |
29 |
message[0] = "* Care for a tune, my dude?" |
30 |
ch_msg = 0 |
31 |
break |
32 |
} |
33 |
|
34 |
if (outcome == 1) |
35 |
{ |
36 |
other.waiter = 2 |
37 |
other.npc_flag = 1 |
38 |
} |
39 |
if (outcome == 2) |
40 |
{ |
41 |
other.waiter = 5 |
42 |
other.npc_flag = 1 |
43 |
} |
44 |
} |
45 |
} |
46 |
if (waiter == 2 && (!instance_exists(obj_dialogue))) |
47 |
{ |
48 |
play_song = 0 |
49 |
waiter = 3 |
50 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
51 |
with (msg) |
52 |
{ |
53 |
portrait = false |
54 |
if (irandom(other.bark_song_chance) == 0) |
55 |
{ |
56 |
message[0] = "* Alright, nice." |
57 |
message[1] = "* Hmm... let me work up somethin'# special." |
58 |
message[2] = "* This one's for the fluffy# trouble makers out there." |
59 |
other.song = mus_honeydew_bark |
60 |
other.bark_song_chance = 8 |
61 |
return; |
62 |
} |
63 |
else |
64 |
other.bark_song_chance -= 1 |
65 |
for (var ransong_new = irandom(2); ransong_new == other.ransong; ransong_new = irandom(2)) |
66 |
{ |
67 |
} |
68 |
other.ransong = ransong_new |
69 |
switch ransong_new |
70 |
{ |
71 |
case 0: |
72 |
message[0] = "* Sounds good, buddy." |
73 |
message[1] = "* Here's a mysterious song full# of new discoveries." |
74 |
other.song = mus_honeydew_ruins |
75 |
break |
76 |
case 1: |
77 |
message[0] = "* Right on, dude." |
78 |
message[1] = "* This is a chilly song you can# curl up by the fireplace to." |
79 |
other.song = mus_honeydew_snow |
80 |
break |
81 |
case 2: |
82 |
message[0] = "* Sounds good, friend." |
83 |
message[1] = "* Here's one for the monsters# that like a little time to# themselves." |
84 |
other.song = mus_honeydew_dalv |
85 |
break |
86 |
} |
87 |
|
88 |
} |
89 |
} |
90 |
else if (waiter == 3 && (!global.dialogue_open)) |
91 |
{ |
92 |
instance_destroy(obj_dialoguebox_dummy) |
93 |
scr_cutscene_end() |
94 |
play_song = 1 |
95 |
waiter = 0 |
96 |
} |
97 |
if (waiter == 5 && (!instance_exists(obj_dialogue))) |
98 |
{ |
99 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
100 |
with (msg) |
101 |
{ |
102 |
portrait = false |
103 |
message[0] = "* Well, uh, I can't comply with# that, considering we've been# hired to play here." |
104 |
message[1] = "* If you wanna hear something# different, just talk to me,# alright?" |
105 |
} |
106 |
waiter++ |
107 |
} |
108 |
if (waiter == 6 && (!instance_exists(obj_dialogue))) |
109 |
{ |
110 |
scr_cutscene_end() |
111 |
instance_destroy(obj_dialoguebox_dummy) |
112 |
waiter = 0 |
113 |
} |
114 |
if (play_song == 1) |
115 |
{ |
116 |
var current_song = obj_radio.bgm |
117 |
if (current_song != song) |
118 |
{ |
119 |
audio_sound_gain(current_song, 0, 250) |
120 |
if (audio_sound_get_gain(current_song) <= 0) |
121 |
{ |
122 |
audio_stop_sound(current_song) |
123 |
audio_sound_gain(current_song, 1, 1) |
124 |
obj_radio.bgm = song |
125 |
audio_sound_gain(obj_radio.bgm, 1, 1) |
126 |
animate = 1 |
127 |
with (obj_radio) |
128 |
{ |
129 |
audio_stop_sound(current_song) |
130 |
if (bgm == mus_honeydew_lodge) |
131 |
current_song = audio_play_sound(bgm, 20, 1) |
132 |
else |
133 |
current_song = audio_play_sound(bgm, 20, 0) |
134 |
} |
135 |
play_song = 0 |
136 |
if (song != 147) |
137 |
play_song = 2 |
138 |
return; |
139 |
} |
140 |
else |
141 |
animate = 0 |
142 |
} |
143 |
} |
144 |
if ((!audio_is_playing(song)) && play_song == 2) |
145 |
{ |
146 |
song = 147 |
147 |
play_song = 1 |
148 |
} |
149 |
if ((!instance_exists(obj_dialoguebox_dummy)) && talk == true) |
150 |
talk = false |
151 |
if (animate == 0) |
152 |
{ |
153 |
image_speed = 0 |
154 |
image_index = 0 |
155 |
} |
156 |
else |
157 |
image_speed = 0.2 |
158 |
if instance_exists(obj_overworld_shop_fade_out_screen) |
159 |
persistent = true |
160 |
else if (persistent == true) |
161 |
{ |
162 |
if (room == rm_shop) |
163 |
image_alpha = 0 |
164 |
else |
165 |
{ |
166 |
image_alpha = 1 |
167 |
persistent = false |
168 |
} |
169 |
} |