| 1 |
event_inherited(); |
| 2 |
if (interact) |
| 3 |
{ |
| 4 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 5 |
is_talking = 1; |
| 6 |
switch (npc_flag) |
| 7 |
{ |
| 8 |
case 0: |
| 9 |
with (msg) |
| 10 |
{ |
| 11 |
portrait = false; |
| 12 |
sndfnt = 99; |
| 13 |
message[0] = "* I just ADORE mining!!"; |
| 14 |
message[1] = "* Mine mine mine mine mine mine# day and night!!"; |
| 15 |
message[2] = "* Gonna find a whole buncha...# SPARKLY GEmS!!"; |
| 16 |
} |
| 17 |
npc_flag++; |
| 18 |
break; |
| 19 |
case 1: |
| 20 |
with (msg) |
| 21 |
{ |
| 22 |
portrait = false; |
| 23 |
sndfnt = 99; |
| 24 |
message[0] = "* Do not doubt my work ethic for# one sEcond!!"; |
| 25 |
message[1] = "* I work HARD and am nOT on thin# ice with the Foreman!!"; |
| 26 |
message[2] = "* I am on the thickest ice of all# tIME!!"; |
| 27 |
} |
| 28 |
npc_flag++; |
| 29 |
break; |
| 30 |
case 2: |
| 31 |
with (msg) |
| 32 |
{ |
| 33 |
portrait = false; |
| 34 |
sndfnt = 99; |
| 35 |
message[0] = "* Mining mining mining!!"; |
| 36 |
message[1] = "* ..."; |
| 37 |
message[2] = "* Okay, I can't handle this!!"; |
| 38 |
message[3] = "* I'm on my fourteenth warning!!# FOURTEENTH!!"; |
| 39 |
message[4] = "* I've heard rumors that the# Foreman has a \"sixteen strikes,# you're out\" policy!!"; |
| 40 |
message[5] = "* Couldn't he lighten up a# little??"; |
| 41 |
} |
| 42 |
npc_flag++; |
| 43 |
break; |
| 44 |
case 3: |
| 45 |
with (msg) |
| 46 |
{ |
| 47 |
portrait = false; |
| 48 |
sndfnt = 99; |
| 49 |
message[0] = "* HahA!! This is fun!!"; |
| 50 |
} |
| 51 |
break; |
| 52 |
} |
| 53 |
} |
| 54 |
if (!is_talking) |
| 55 |
{ |
| 56 |
sprite_index = spr_miner_stable; |
| 57 |
image_speed = 0.4; |
| 58 |
if (floor(image_index == 0) || ceil(image_index) == 6) |
| 59 |
{ |
| 60 |
if (point_in_rectangle(x, y, __view_get(e__VW.XView, 0), __view_get(e__VW.YView, 0), __view_get(e__VW.XView, 0) + __view_get(e__VW.WView, 0), __view_get(e__VW.YView, 0) + __view_get(e__VW.HView, 0))) |
| 61 |
{ |
| 62 |
if (!audio_is_playing(snd_pickaxe_ding) && !audio_is_playing(snd_pickaxe_ding2)) |
| 63 |
audio_play_sound(choose(snd_pickaxe_ding, snd_pickaxe_ding2), 1, 0); |
| 64 |
} |
| 65 |
} |
| 66 |
} |
| 67 |
else |
| 68 |
{ |
| 69 |
if (npc_flag == 3 && obj_dialogue.message_current > 1 && obj_dialogue.message_current < 5) |
| 70 |
sprite_index = spr_miner_unstable; |
| 71 |
else |
| 72 |
sprite_index = spr_miner_stable_talk; |
| 73 |
image_speed = 0.4; |
| 74 |
} |
| 75 |
|
| 76 |
enum e__VW |
| 77 |
{ |
| 78 |
XView, |
| 79 |
YView, |
| 80 |
WView, |
| 81 |
HView, |
| 82 |
Angle, |
| 83 |
HBorder, |
| 84 |
VBorder, |
| 85 |
HSpeed, |
| 86 |
VSpeed, |
| 87 |
Object, |
| 88 |
Visible, |
| 89 |
XPort, |
| 90 |
YPort, |
| 91 |
WPort, |
| 92 |
HPort, |
| 93 |
Camera, |
| 94 |
SurfaceID |
| 95 |
} |