|
1
|
event_inherited();
|
|
2
|
target = 4;
|
|
3
|
damage = 120;
|
|
4
|
canbepushed = false;
|
|
5
|
shrink_sprite = spr_darkshape_giant;
|
|
6
|
deathrattle = -1;
|
|
7
|
phase = "spawn";
|
|
8
|
light_rate = 0.0075;
|
|
9
|
light_recover = 0.0025;
|
|
10
|
light_treshold = 0;
|
|
11
|
light_damage = 0;
|
|
12
|
image_alpha = 0.5;
|
|
13
|
image_s = 0.5;
|
|
14
|
image_d = 0;
|
|
15
|
image_max = 2;
|
|
16
|
image_min = 0;
|
|
17
|
death_dir = 0;
|
|
18
|
destroyonhit = false;
|
|
19
|
big_shrink = 1;
|
|
20
|
speed_max = 1.25;
|
|
21
|
pushback_radius = 40;
|
|
22
|
x_goal = x;
|
|
23
|
y_goal = y;
|
|
24
|
box_distance = 300;
|
|
25
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("box_distance", 300, 100, 30, 2, "out");
|
|
26
|
if (irandom(1))
|
|
27
|
{
|
|
28
|
box_angle = 90;
|
|
29
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("box_angle", 90, 0, 30, 2, "out");
|
|
30
|
}
|
|
31
|
else
|
|
32
|
{
|
|
33
|
box_angle = 90;
|
|
34
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("box_angle", 90, 180, 30, 2, "out");
|
|
35
|
}
|
|
36
|
phase = "stalk";
|
|
37
|
phase_timer = -35;
|
|
38
|
segment_list = ds_list_create();
|
|
39
|
point_list = ds_list_create();
|
|
40
|
centipath = path_add();
|
|
41
|
path_set_kind(centipath, true);
|
|
42
|
path_set_closed(centipath, false);
|
|
43
|
ds_list_add(segment_list, id);
|
|
44
|
|
|
45
|
chase_heart = function()
|
|
46
|
{
|
|
47
|
var hx = obj_heart.x + 10;
|
|
48
|
var hy = obj_heart.y + 10;
|
|
49
|
if (i_ex(obj_heart))
|
|
50
|
{
|
|
51
|
if (image_alpha == 1 && light < 1 && phase == "stalk")
|
|
52
|
{
|
|
53
|
if (point_distance(x, y, hx, hy) < (obj_darkshape_light_aura.radius + 50))
|
|
54
|
{
|
|
55
|
light = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (light, 1, light_rate);
|
|
56
|
light_treshold = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (light_treshold, 1, light_rate);
|
|
57
|
if ((phase_timer % 3) == 0)
|
|
58
|
{
|
|
59
|
light_damage = 0.12;
|
|
60
|
with (instance_create_depth(x, y, depth + 1, obj_afterimage_anim))
|
|
61
|
{
|
|
62
|
direction = scr_at_playerscr_at_player
function scr_at_player(arg0 = x, arg1 = y)
{
return point_direction(arg0, arg1, obj_heart.x + (obj_heart.sprite_width / 2), obj_heart.y + (obj_heart.sprite_height / 2));
} (x, y) + 180;
|
|
63
|
speed = 1;
|
|
64
|
sprite_index = other.sprite_index;
|
|
65
|
image_xscale = other.image_xscale - 0.25;
|
|
66
|
image_yscale = other.image_yscale - 0.25;
|
|
67
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("image_xscale", other.image_xscale - 0.25, other.image_xscale + 0.25, 16);
|
|
68
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("image_yscale", other.image_yscale - 0.25, other.image_yscale + 0.25, 16);
|
|
69
|
image_alpha = 0.5;
|
|
70
|
fade = 0.03125;
|
|
71
|
}
|
|
72
|
}
|
|
73
|
if (light == 1)
|
|
74
|
{
|
|
75
|
shakeme = false;
|
|
76
|
image_s = 0.5;
|
|
77
|
image_d = 0;
|
|
78
|
image_max = 2;
|
|
79
|
image_min = 0;
|
|
80
|
with (obj_lerpvar)
|
|
81
|
{
|
|
82
|
if (variable_instance_exists(id, "movevar"))
|
|
83
|
instance_destroy();
|
|
84
|
}
|
|
85
|
death_dir = point_direction(scr_get_boxscr_get_box
function scr_get_box(arg0)
{
switch (arg0)
{
case 0:
return obj_growtangle.x + (obj_growtangle.sprite_width * 0.5);
break;
case 1:
return obj_growtangle.y - (obj_growtangle.sprite_height * 0.5);
break;
case 2:
return obj_growtangle.x - (obj_growtangle.sprite_width * 0.5);
break;
case 3:
return obj_growtangle.y + (obj_growtangle.sprite_height * 0.5);
break;
case 4:
return obj_growtangle.x;
break;
case 5:
return obj_growtangle.y;
break;
return false;
}
} (4), scr_get_boxscr_get_box
function scr_get_box(arg0)
{
switch (arg0)
{
case 0:
return obj_growtangle.x + (obj_growtangle.sprite_width * 0.5);
break;
case 1:
return obj_growtangle.y - (obj_growtangle.sprite_height * 0.5);
break;
case 2:
return obj_growtangle.x - (obj_growtangle.sprite_width * 0.5);
break;
case 3:
return obj_growtangle.y + (obj_growtangle.sprite_height * 0.5);
break;
case 4:
return obj_growtangle.x;
break;
case 5:
return obj_growtangle.y;
break;
return false;
}
} (5), x, y);
|
|
86
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("x", x, x + lengthdir_x(100, death_dir), 16, 1, "out");
|
|
87
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("y", y, y + lengthdir_y(100, death_dir), 16, 1, "out");
|
|
88
|
death_dir += choose(-100, 100);
|
|
89
|
snd_stop(snd_tspawn);
|
|
90
|
deathrattle = snd_play(snd_tspawn, 1, 1);
|
|
91
|
clear_spawn();
|
|
92
|
with (instance_create_depth(x, y, depth, obj_bulletparent))
|
|
93
|
{
|
|
94
|
image_xscale = 0.25;
|
|
95
|
image_yscale = 0.25;
|
|
96
|
sprite_index = spr_finisher_explosion;
|
|
97
|
image_index = 2;
|
|
98
|
image_speed = 1/3;
|
|
99
|
image_blend = c_gray;
|
|
100
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("image_xscale", 0.25, 4, 12);
|
|
101
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("image_yscale", 0.25, 4, 12);
|
|
102
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
} (instance_destroy, 12);
|
|
103
|
}
|
|
104
|
repeat (12)
|
|
105
|
{
|
|
106
|
randir = irandom(360);
|
|
107
|
with (instance_create_depth(x + lengthdir_x(32, randir), y + lengthdir_y(32, randir), depth + 2, obj_particle_generic))
|
|
108
|
{
|
|
109
|
image_xscale *= 2;
|
|
110
|
image_yscale *= 2;
|
|
111
|
sprite_index = spr_ring_particle1;
|
|
112
|
image_blend = c_white;
|
|
113
|
direction = point_direction(other.x, other.y, x, y);
|
|
114
|
speed = 2 + random(6);
|
|
115
|
shrink_rate = 0.15 + random(0.1);
|
|
116
|
}
|
|
117
|
}
|
|
118
|
phase_timer = 0;
|
|
119
|
phase = "death";
|
|
120
|
}
|
|
121
|
if (light_treshold > 0.5 && light < 1)
|
|
122
|
{
|
|
123
|
shakeme = false;
|
|
124
|
image_s = 0.5;
|
|
125
|
image_d = 0;
|
|
126
|
image_max = 2;
|
|
127
|
image_min = 0;
|
|
128
|
with (obj_lerpvar)
|
|
129
|
{
|
|
130
|
if (variable_instance_exists(id, "movevar"))
|
|
131
|
instance_destroy();
|
|
132
|
}
|
|
133
|
with (scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("box_distance", 100, 220, 15, 3, "out"))
|
|
134
|
movevar = true;
|
|
135
|
light_treshold = 0;
|
|
136
|
snd_play(snd_tspawn, 1, 1.5);
|
|
137
|
snd_play(snd_tspawn, 1, 1);
|
|
138
|
snd_play(snd_tspawn, 1, 0.5);
|
|
139
|
clear_spawn();
|
|
140
|
with (instance_create_depth(x, y, depth, obj_bulletparent))
|
|
141
|
{
|
|
142
|
image_xscale = 0.25;
|
|
143
|
image_yscale = 0.25;
|
|
144
|
sprite_index = spr_finisher_explosion;
|
|
145
|
image_index = 2;
|
|
146
|
image_speed = 1/3;
|
|
147
|
image_blend = c_gray;
|
|
148
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("image_xscale", 0.25, 4, 12);
|
|
149
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("image_yscale", 0.25, 4, 12);
|
|
150
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
} (instance_destroy, 12);
|
|
151
|
}
|
|
152
|
repeat (12)
|
|
153
|
{
|
|
154
|
randir = irandom(360);
|
|
155
|
with (instance_create_depth(x + lengthdir_x(32, randir), y + lengthdir_y(32, randir), depth + 2, obj_particle_generic))
|
|
156
|
{
|
|
157
|
image_xscale *= 2;
|
|
158
|
image_yscale *= 2;
|
|
159
|
sprite_index = spr_ring_particle1;
|
|
160
|
image_blend = c_white;
|
|
161
|
direction = point_direction(other.x, other.y, x, y);
|
|
162
|
speed = 2 + random(6);
|
|
163
|
shrink_rate = 0.15 + random(0.1);
|
|
164
|
}
|
|
165
|
}
|
|
166
|
phase_timer = 0;
|
|
167
|
phase = "sudden reposition";
|
|
168
|
}
|
|
169
|
with (obj_darkshape_manager)
|
|
170
|
{
|
|
171
|
ominous_decline = false;
|
|
172
|
ominous_volume = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (ominous_volume, 1, (1 - ominous_volume) * 0.25);
|
|
173
|
}
|
|
174
|
var randir = scr_at_playerscr_at_player
function scr_at_player(arg0 = x, arg1 = y)
{
return point_direction(arg0, arg1, obj_heart.x + (obj_heart.sprite_width / 2), obj_heart.y + (obj_heart.sprite_height / 2));
} (x, y) + irandom_range(-45, 45);
|
|
175
|
if (!irandom(2))
|
|
176
|
{
|
|
177
|
with (instance_create_depth(x - lengthdir_x(32, randir), y - lengthdir_y(32, randir), depth + 2, obj_particle_generic))
|
|
178
|
{
|
|
179
|
image_blend = c_white;
|
|
180
|
direction = point_direction(other.x, other.y, x, y);
|
|
181
|
speed = 1 + random(3);
|
|
182
|
shrink_rate = 0.2;
|
|
183
|
}
|
|
184
|
}
|
|
185
|
}
|
|
186
|
}
|
|
187
|
}
|
|
188
|
};
|
|
189
|
|
|
190
|
clear_spawn = function()
|
|
191
|
{
|
|
192
|
with (obj_darkshape)
|
|
193
|
{
|
|
194
|
if (id != other.id)
|
|
195
|
{
|
|
196
|
light = 1;
|
|
197
|
check_death();
|
|
198
|
}
|
|
199
|
}
|
|
200
|
with (obj_darkshape_spawnbullet)
|
|
201
|
{
|
|
202
|
var randir = irandom(360);
|
|
203
|
with (instance_create_depth(x, y, depth + 2, obj_particle_generic))
|
|
204
|
{
|
|
205
|
image_xscale *= 2;
|
|
206
|
image_yscale *= 2;
|
|
207
|
sprite_index = spr_ring_particle1;
|
|
208
|
image_blend = c_white;
|
|
209
|
direction = randir;
|
|
210
|
speed = 1 + random(3);
|
|
211
|
shrink_rate = 0.15 + random(0.1);
|
|
212
|
}
|
|
213
|
instance_destroy();
|
|
214
|
}
|
|
215
|
};
|