|
1
|
timer--;
|
|
2
|
if (!init)
|
|
3
|
{
|
|
4
|
heartlight = instance_create(x, y, obj_lightsource_heartlight);
|
|
5
|
heartlight.radius = 75;
|
|
6
|
if (difficulty < 2)
|
|
7
|
{
|
|
8
|
lightsource = instance_create(x, y, obj_lightsource_static);
|
|
9
|
lightsource.visible = false;
|
|
10
|
lightsource.radius = 300 - (difficulty * 150);
|
|
11
|
}
|
|
12
|
init = true;
|
|
13
|
choice = irandom(3);
|
|
14
|
length = string_length(pattern[choice]);
|
|
15
|
}
|
|
16
|
if (timer <= 0 && index < length)
|
|
17
|
{
|
|
18
|
var _bullet = instance_create(x, y, obj_darkness_sound_bullet);
|
|
19
|
_bullet.dir = real(string_char_at(pattern[choice], index + 1));
|
|
20
|
_bullet.delay = delay * 2;
|
|
21
|
_bullet.depth = 8;
|
|
22
|
scr_bullet_inheritscr_bullet_inherit
function scr_bullet_inherit(arg0)
{
if (i_ex(arg0))
{
if (damage != -1)
arg0.damage = damage;
if (grazepoints != -1)
arg0.grazepoints = grazepoints;
if (timepoints != -1)
arg0.timepoints = timepoints;
if (inv != -1)
arg0.inv = inv;
if (target != -1)
arg0.target = target;
if (grazed != -1)
arg0.grazed = 0;
if (grazetimer != -1)
arg0.grazetimer = 0;
if (object_index == obj_dbulletcontroller)
{
arg0.creatorid = creatorid;
arg0.creator = creator;
}
arg0.element = element;
}
} (_bullet);
|
|
23
|
timer = delay * real(string_char_at(timing[choice], index + 1));
|
|
24
|
index++;
|
|
25
|
}
|