1 |
switch scene |
2 |
{ |
3 |
case 0: |
4 |
if (image_speed == 0 && image_index == 0) |
5 |
{ |
6 |
image_speed = 1 |
7 |
audio_play_sound(snd_sliding_door_open, 1, 0) |
8 |
} |
9 |
image_speed = 1 |
10 |
if (image_index >= (image_number - 1)) |
11 |
{ |
12 |
image_index = image_number - 1 |
13 |
image_speed = 0 |
14 |
scene++ |
15 |
} |
16 |
break |
17 |
case 1: |
18 |
obj_player_npc.image_alpha += 0.2 |
19 |
if (obj_player_npc.image_alpha >= 1) |
20 |
scene++ |
21 |
break |
22 |
case 2: |
23 |
if cutscene_npc_walk(1168, 800, 290, 3, "y", "left") |
24 |
{ |
25 |
if (global.party_member != -4) |
26 |
scene = 3 |
27 |
else |
28 |
scene = 5 |
29 |
} |
30 |
break |
31 |
case 3: |
32 |
actor_follower.image_alpha += 0.2 |
33 |
if (actor_follower.image_alpha >= 1) |
34 |
scene++ |
35 |
break |
36 |
case 4: |
37 |
cutscene_npc_walk(actor_follower, 820, 290, 3, "y", "left") |
38 |
break |
39 |
case 5: |
40 |
obj_pl.direction = 180 |
41 |
cutscene_actor_into_follower() |
42 |
break |
43 |
case 6: |
44 |
image_speed = -1 |
45 |
if (image_index <= 1) |
46 |
{ |
47 |
image_index = 0 |
48 |
image_speed = 0 |
49 |
scene++ |
50 |
} |
51 |
break |
52 |
case 7: |
53 |
instance_destroy(obj_player_npc) |
54 |
scr_cutscene_end() |
55 |
scene = 8 |
56 |
break |
57 |
} |
58 |
|
59 |
switch scene |
60 |
{ |
61 |
case 8: |
62 |
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)) |
63 |
{ |
64 |
if (global.route == 2 || global.sworks_flag[41] == 1 || global.sworks_flag[61] == 1) |
65 |
{ |
66 |
audio_play_sound(snd_sliding_door_open, 1, 0) |
67 |
image_speed = 1 |
68 |
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
} () |
69 |
cutscene_advance() |
70 |
} |
71 |
else |
72 |
{ |
73 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
74 |
with (msg) |
75 |
message[0] = "* (The elevator is# unresponsive.)" |
76 |
} |
77 |
} |
78 |
break |
79 |
case 9: |
80 |
if (image_index > (image_number - 1)) |
81 |
{ |
82 |
image_speed = 0 |
83 |
image_index = image_number - 1 |
84 |
cutscene_advance() |
85 |
} |
86 |
break |
87 |
case 10: |
88 |
if (global.party_member != -4) |
89 |
scr_follower_into_actorscr_follower_into_actorfunction scr_follower_into_actor() //gml_Script_scr_follower_into_actor
{
if (global.party_member == noone)
return false;
actor_follower = instance_create(global.party_member.x, global.party_member.y, global.party_member.npc_actor)
with (global.party_member)
{
switch sprite_index
{
case up_sprite:
case up_sprite_idle:
case up_sprite_run:
other.actor_follower.npc_direction = "up"
other.actor_follower.sprite_index = other.actor_follower.up_sprite
break
case down_sprite:
case down_sprite_idle:
case down_sprite_run:
other.actor_follower.npc_direction = "down"
other.actor_follower.sprite_index = other.actor_follower.down_sprite
break
case left_sprite:
case left_sprite_idle:
case left_sprite_run:
other.actor_follower.npc_direction = "left"
other.actor_follower.sprite_index = other.actor_follower.left_sprite
break
case right_sprite:
case right_sprite_idle:
case right_sprite_run:
other.actor_follower.sprite_index = other.actor_follower.right_sprite
break
}
instance_destroy()
}
return true;
} () |
90 |
instance_create(obj_pl.x, obj_pl.y, obj_player_npc) |
91 |
cutscene_advance() |
92 |
break |
93 |
case 11: |
94 |
if cutscene_npc_walk(1168, 840, 260, 3, "x", "up") |
95 |
{ |
96 |
if (global.party_member != -4) |
97 |
scene = 12 |
98 |
else |
99 |
scene = 13 |
100 |
} |
101 |
break |
102 |
case 12: |
103 |
cutscene_npc_walk(actor_follower, 840, 260, 3, "x", "up") |
104 |
break |
105 |
case 13: |
106 |
cutscene_change_room(209, 160, 220, 0.1) |
107 |
break |
108 |
} |
109 |
|
110 |
if (scene > 10) |
111 |
{ |
112 |
if (obj_player_npc.y < 275 && obj_player_npc.image_alpha > 0) |
113 |
obj_player_npc.image_alpha -= 0.2 |
114 |
if (global.party_member != -4 && actor_follower.y < 275 && actor_follower.image_alpha > 0) |
115 |
actor_follower.image_alpha -= 0.2 |
116 |
} |