Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_knight_bullethell2_Other_11

(view raw script w/o annotations or w/e)
1
if (!i_ex(obj_knight_lightorb))
2
    exit;
3
var _dir = dir + (sin(timer / 10) * 15);
4
if (obj_knight_lightorb.type == 1)
5
    _dir = dir;
6
timer++;
7
if (con == 0 && timer >= 0)
8
{
9
    bul = instance_create(x, y, obj_knight_bullethell_bullet);
10
    bul.speed = spd;
11
    bul.direction = (_dir - 58) + c;
12
    bul.image_angle = bul.direction;
13
    bul.x += lengthdir_x(4, _dir + a);
14
    bul.y += lengthdir_y(4, _dir + a);
15
    bul = instance_create(x, y, obj_knight_bullethell_bullet);
16
    bul.speed = spd;
17
    bul.direction = ((_dir + 180) - 58) + c;
18
    bul.image_angle = bul.direction;
19
    bul.x += lengthdir_x(4, _dir + a);
20
    bul.y += lengthdir_y(4, _dir + a);
21
    bul = instance_create(x, y, obj_knight_bullethell_bullet);
22
    bul.speed = spd;
23
    bul.direction = _dir;
24
    bul.image_angle = bul.direction;
25
    bul.x += lengthdir_x(4, _dir + a);
26
    bul.y += lengthdir_y(4, _dir + a);
27
    bul = instance_create(x, y, obj_knight_bullethell_bullet);
28
    bul.speed = spd;
29
    bul.direction = _dir + 180;
30
    bul.image_angle = bul.direction;
31
    bul.x += lengthdir_x(4, _dir + a);
32
    bul.y += lengthdir_y(4, _dir + a);
33
    bul = instance_create(x, y, obj_knight_bullethell_bullet);
34
    bul.speed = spd;
35
    bul.direction = (_dir + 58) - c;
36
    bul.image_angle = bul.direction;
37
    bul.x += lengthdir_x(4, _dir + a);
38
    bul.y += lengthdir_y(4, _dir + a);
39
    bul = instance_create(x, y, obj_knight_bullethell_bullet);
40
    bul.speed = spd;
41
    bul.direction = (_dir + 180 + 58) - c;
42
    bul.image_angle = bul.direction;
43
    bul.x += lengthdir_x(4, _dir + a);
44
    bul.y += lengthdir_y(4, _dir + a);
45
    snd_stop(snd_heartshot_dr_b);
46
    snd_play_x(snd_heartshot_dr_b, 1, 0.8);
47
    a = 0;
48
    c += 0.26;
49
}
50
if (i_ex(obj_knight_enemy) && global.turntimer < 1)
51
    instance_destroy();
52
if (timer > 70)
53
    instance_destroy();