1 |
if (active == 1) |
2 |
{ |
3 |
if (instance_exists(obj_mainchara)) |
4 |
{ |
5 |
if (cn == 0 && global.interact == 0 && obj_mainchara.x > x) |
6 |
{ |
7 |
global.interact = 1; |
8 |
undyne.image_alpha = 0; |
9 |
cn = 0.1; |
10 |
ou = instance_create(0, 0, obj_musfadeout); |
11 |
ou.fadespeed = 0.05; |
12 |
snd_play(snd_arrow); |
13 |
ar = instance_create(x + 30, -220, obj_npc_marker); |
14 |
ar.visible = true; |
15 |
ar.sprite_index = spr_undynespear; |
16 |
ar.image_angle = -90; |
17 |
ar.vspeed = 24; |
18 |
ar.friction = -0.3; |
19 |
} |
20 |
} |
21 |
if (cn == 0.1) |
22 |
{ |
23 |
if (ar.y > 160) |
24 |
{ |
25 |
ar.image_angle = 0; |
26 |
ar.sprite_index = spr_undynespear_stabbed; |
27 |
ar.y += ar.vspeed; |
28 |
ar.vspeed = 0; |
29 |
snd_play(snd_impact); |
30 |
instance_create(0, 0, obj_flasher); |
31 |
scr_shakescr_shakeinstance_create(0, 0, obj_shaker);
obj_shaker.hshake = argument0;
obj_shaker.vshake = argument1;
obj_shaker.shakespeed = argument2; (4, 4, 2); |
32 |
cn = 0.2; |
33 |
alarm[4] = 50; |
34 |
instance_create(40, 180, obj_solidsmall); |
35 |
instance_create(40, 200, obj_solidsmall); |
36 |
instance_create(40, 220, obj_solidsmall); |
37 |
yad = 0; |
38 |
repeat (5) |
39 |
{ |
40 |
ar2 = instance_create(50 - yad, 210 - (yad * 6), obj_npc_marker); |
41 |
ar2.visible = true; |
42 |
ar2.sprite_index = spr_undynespear_stabbed; |
43 |
yad += 2; |
44 |
} |
45 |
} |
46 |
} |
47 |
if (cn == 1.2) |
48 |
{ |
49 |
if (ar.image_alpha > 0.02) |
50 |
ar.image_alpha -= 0.1; |
51 |
if (view_yview[0] > 10) |
52 |
view_yview -= 5; |
53 |
else |
54 |
cn = 2; |
55 |
} |
56 |
if (cn == 2) |
57 |
{ |
58 |
caster_play(ushock, 1, 1); |
59 |
cn = 3; |
60 |
alarm[4] = 30; |
61 |
} |
62 |
if (cn == 3) |
63 |
{ |
64 |
if (undyne.image_alpha < 1) |
65 |
undyne.image_alpha += 0.05; |
66 |
} |
67 |
if (cn == 4) |
68 |
{ |
69 |
global.currentsong = usong; |
70 |
caster_loop(global.currentsong, 1, 1); |
71 |
global.interact = 0; |
72 |
global.flag[17 menu_disabled] = 1; |
73 |
global.flag[77 armor_undyne_saw] = global.armor; |
74 |
cn = 5; |
75 |
} |
76 |
if (cn == 5) |
77 |
{ |
78 |
undyne.vspeed = 4; |
79 |
undyne.image_speed = 0.25; |
80 |
cn = 6; |
81 |
alarm[4] = 6; |
82 |
} |
83 |
if (cn == 7) |
84 |
{ |
85 |
undyne.image_speed = 0; |
86 |
undyne.vspeed = 0; |
87 |
sp = instance_create(undyne.x, undyne.y, obj_uspeargen); |
88 |
cn = 8; |
89 |
} |
90 |
if (cn > 7) |
91 |
{ |
92 |
sp.x = undyne.x + 24; |
93 |
sp.y = undyne.y + 20; |
94 |
} |
95 |
if (cn == 8) |
96 |
{ |
97 |
if (stk.image_alpha < 1) |
98 |
stk.image_alpha += 0.1; |
99 |
if (stopper == 1) |
100 |
{ |
101 |
alarm[4] = -1; |
102 |
cn = 10; |
103 |
stopper = 0; |
104 |
} |
105 |
if (obj_mainchara.x > (undyne.x + 80) && undyne.x < room_width) |
106 |
{ |
107 |
undyne.hspeed = 3; |
108 |
undyne.image_speed = 0.2; |
109 |
alarm[4] = 20; |
110 |
cn = 9; |
111 |
} |
112 |
if (obj_mainchara.x < (undyne.x - 60)) |
113 |
{ |
114 |
undyne.hspeed = -3; |
115 |
undyne.image_speed = 0.2; |
116 |
alarm[4] = 20; |
117 |
cn = 9; |
118 |
} |
119 |
} |
120 |
if (cn == 10) |
121 |
{ |
122 |
if (obj_mainchara.x > (undyne.x + 80) || obj_mainchara.x < (undyne.x - 60)) |
123 |
{ |
124 |
cn = 8; |
125 |
} |
126 |
else |
127 |
{ |
128 |
undyne.image_speed = 0; |
129 |
undyne.hspeed = 0; |
130 |
cn = 8; |
131 |
} |
132 |
} |
133 |
if (cn == 9) |
134 |
{ |
135 |
if (alarm[4] <= 0) |
136 |
cn = 10; |
137 |
} |
138 |
} |