1 |
event_inherited(); |
2 |
if (interact && audio_is_playing(song)) |
3 |
{ |
4 |
scr_cutscene_start(); |
5 |
waiter = 1; |
6 |
} |
7 |
if (waiter == 1) |
8 |
{ |
9 |
scr_textscr_textfunction 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 |
if (outcome == 1) |
34 |
{ |
35 |
other.waiter = 2; |
36 |
other.npc_flag = 1; |
37 |
} |
38 |
if (outcome == 2) |
39 |
{ |
40 |
other.waiter = 5; |
41 |
other.npc_flag = 1; |
42 |
} |
43 |
} |
44 |
} |
45 |
if (waiter == 2 && !instance_exists(obj_dialogue)) |
46 |
{ |
47 |
play_song = 0; |
48 |
waiter = 3; |
49 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
50 |
with (msg) |
51 |
{ |
52 |
portrait = false; |
53 |
if (irandom(other.bark_song_chance) == 0) |
54 |
{ |
55 |
message[0] = "* Alright, nice."; |
56 |
message[1] = "* Hmm... let me work up somethin'# special."; |
57 |
message[2] = "* This one's for the fluffy# trouble makers out there."; |
58 |
other.song = 145; |
59 |
other.bark_song_chance = 8; |
60 |
exit; |
61 |
} |
62 |
else |
63 |
{ |
64 |
other.bark_song_chance -= 1; |
65 |
} |
66 |
var ransong_new = irandom(2); |
67 |
while (ransong_new == other.ransong) |
68 |
ransong_new = irandom(2); |
69 |
other.ransong = ransong_new; |
70 |
switch (ransong_new) |
71 |
{ |
72 |
case 0: |
73 |
message[0] = "* Sounds good, buddy."; |
74 |
message[1] = "* Here's a mysterious song full# of new discoveries."; |
75 |
other.song = 148; |
76 |
break; |
77 |
case 1: |
78 |
message[0] = "* Right on, dude."; |
79 |
message[1] = "* This is a chilly song you can# curl up by the fireplace to."; |
80 |
other.song = 149; |
81 |
break; |
82 |
case 2: |
83 |
message[0] = "* Sounds good, friend."; |
84 |
message[1] = "* Here's one for the monsters# that like a little time to# themselves."; |
85 |
other.song = 146; |
86 |
break; |
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()
{
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 == 147) |
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 |
exit; |
139 |
} |
140 |
else |
141 |
{ |
142 |
animate = 0; |
143 |
} |
144 |
} |
145 |
} |
146 |
if (!audio_is_playing(song) && play_song == 2) |
147 |
{ |
148 |
song = 147; |
149 |
play_song = 1; |
150 |
} |
151 |
if (!instance_exists(obj_dialoguebox_dummy) && talk == true) |
152 |
talk = false; |
153 |
if (animate == 0) |
154 |
{ |
155 |
image_speed = 0; |
156 |
image_index = 0; |
157 |
} |
158 |
else |
159 |
{ |
160 |
image_speed = 0.2; |
161 |
} |
162 |
if (instance_exists(obj_overworld_shop_fade_out_screen)) |
163 |
{ |
164 |
persistent = true; |
165 |
} |
166 |
else if (persistent == true) |
167 |
{ |
168 |
if (room == rm_shop) |
169 |
{ |
170 |
image_alpha = 0; |
171 |
} |
172 |
else |
173 |
{ |
174 |
image_alpha = 1; |
175 |
persistent = false; |
176 |
} |
177 |
} |