1 |
if live_call() |
2 |
return global.live_result; |
3 |
switch scene |
4 |
{ |
5 |
case 0: |
6 |
image_speed = 1 |
7 |
if (image_index >= (image_number - 1)) |
8 |
{ |
9 |
image_index = image_number - 1 |
10 |
image_speed = 0 |
11 |
scene++ |
12 |
} |
13 |
break |
14 |
case 1: |
15 |
obj_player_npc.image_alpha += 0.2 |
16 |
if (obj_player_npc.image_alpha >= 1) |
17 |
scene++ |
18 |
break |
19 |
case 2: |
20 |
if cutscene_npc_walk(1168, obj_player_npc.x, 150, 3, "y", "down") |
21 |
{ |
22 |
if (global.party_member != -4) |
23 |
scene = 3 |
24 |
else |
25 |
scene = 5 |
26 |
} |
27 |
break |
28 |
case 3: |
29 |
obj_martlet_npc.image_alpha += 0.2 |
30 |
if (obj_martlet_npc.image_alpha >= 1) |
31 |
scene++ |
32 |
break |
33 |
case 4: |
34 |
cutscene_npc_walk(1164, obj_player_npc.x, 130, 3, "y", "down") |
35 |
break |
36 |
case 5: |
37 |
obj_pl.direction = 270 |
38 |
cutscene_actor_into_follower() |
39 |
break |
40 |
case 6: |
41 |
image_speed = -1 |
42 |
if (image_index <= 1) |
43 |
{ |
44 |
image_index = 0 |
45 |
image_speed = 0 |
46 |
scene++ |
47 |
} |
48 |
break |
49 |
case 7: |
50 |
instance_destroy(obj_player_npc) |
51 |
scr_cutscene_end() |
52 |
scene = 8 |
53 |
break |
54 |
} |
55 |
|
56 |
switch scene |
57 |
{ |
58 |
case 8: |
59 |
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)) |
60 |
{ |
61 |
image_speed = 1 |
62 |
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
} () |
63 |
cutscene_advance() |
64 |
} |
65 |
break |
66 |
case 9: |
67 |
if (image_index > (image_number - 1)) |
68 |
{ |
69 |
image_speed = 0 |
70 |
image_index = image_number - 1 |
71 |
cutscene_advance() |
72 |
} |
73 |
break |
74 |
case 10: |
75 |
if (global.party_member != -4) |
76 |
{ |
77 |
cutscene_follower_into_actor() |
78 |
obj_martlet_npc.x_dest = 0 |
79 |
obj_martlet_npc.y_dest = 0 |
80 |
obj_martlet_npc.x_dest[0] = 0 |
81 |
obj_martlet_npc.y_dest[0] = 0 |
82 |
obj_martlet_npc.can_walk = false |
83 |
} |
84 |
instance_create(obj_pl.x, obj_pl.y, obj_player_npc) |
85 |
cutscene_advance() |
86 |
break |
87 |
case 11: |
88 |
if cutscene_npc_walk(1168, 457, 100, 3, "x", "down") |
89 |
{ |
90 |
if (global.party_member != -4) |
91 |
scene = 12 |
92 |
else |
93 |
scene = 13 |
94 |
} |
95 |
if (obj_player_npc.y < 140 && obj_player_npc.image_alpha > 0) |
96 |
obj_player_npc.image_alpha -= 0.2 |
97 |
break |
98 |
case 12: |
99 |
show_debug_message(obj_martlet_npc.x_dest[0]) |
100 |
cutscene_npc_walk(1164, obj_player_npc.x, 120, 3, "x", "down") |
101 |
if (obj_martlet_npc.y < 140 && obj_martlet_npc.image_alpha > 0) |
102 |
obj_martlet_npc.image_alpha -= 0.2 |
103 |
break |
104 |
case 13: |
105 |
cutscene_change_room(259, 160, 220, 0.1) |
106 |
break |
107 |
} |
108 |
|
109 |
if (image_index == 0 && image_speed == 1) |
110 |
{ |
111 |
if (!audio_is_playing(snd_sliding_door_open)) |
112 |
audio_play_sound(snd_sliding_door_open, 1, 0) |
113 |
} |