| 1 |
script_execute(scr_depth, 0, 0, 0, 0, 0); |
| 2 |
if (instance_exists(obj_dialogue) && talk == true) |
| 3 |
{ |
| 4 |
if (obj_dialogue.cutoff == string_length(obj_dialogue.message[obj_dialogue.message_current])) |
| 5 |
sprite_index = spr_fliernpcfly; |
| 6 |
else |
| 7 |
sprite_index = spr_fliernpctalk; |
| 8 |
} |
| 9 |
if (!instance_exists(obj_dialogue)) |
| 10 |
sprite_index = spr_fliernpcfly; |
| 11 |
if (keyboard_multicheck_pressed(0) && scr_interactscr_interactfunction scr_interact()
{
if (distance_to_object(obj_pl) < 20 && obj_pl.state == 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) |
| 12 |
{ |
| 13 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 14 |
talk = 1; |
| 15 |
switch (global.sideNpc[0]) |
| 16 |
{ |
| 17 |
case 0: |
| 18 |
with (msg) |
| 19 |
{ |
| 20 |
portrait = false; |
| 21 |
sndfnt = 99; |
| 22 |
message[0] = "* Oh hey! I was just thinking..."; |
| 23 |
message[1] = "* I really have to show you# this house I'm checking out!"; |
| 24 |
message[2] = "* It's on a beach just# outside of the Ruins. "; |
| 25 |
message[3] = "* Hey, what's with that look?#* I'm following your advice# and being myself. "; |
| 26 |
message[4] = "* I'll just be myself in# a really cool beach house! "; |
| 27 |
} |
| 28 |
global.sideNpc[0] = 1; |
| 29 |
break; |
| 30 |
case 1: |
| 31 |
with (msg) |
| 32 |
{ |
| 33 |
portrait = false; |
| 34 |
sndfnt = 99; |
| 35 |
message[0] = "* You gotta get out and# live a little once in# a while. "; |
| 36 |
message[1] = "* If you stay in one place# too long it feels like things# start to loop. "; |
| 37 |
message[2] = "* It can drive you a little# crazy. "; |
| 38 |
} |
| 39 |
global.sideNpc[0] = 2; |
| 40 |
break; |
| 41 |
case 2: |
| 42 |
with (msg) |
| 43 |
{ |
| 44 |
portrait = false; |
| 45 |
sndfnt = 99; |
| 46 |
message[0] = "* I'm totally gonna learn all# the hip dance moves out there!"; |
| 47 |
} |
| 48 |
break; |
| 49 |
} |
| 50 |
} |
| 51 |
if (!instance_exists(obj_dialogue) && talk == true) |
| 52 |
talk = false; |