Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_knight_bullethell2_Other_10

(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
    repeat (3)
10
    {
11
        bul = instance_create(x, y, obj_knight_bullethell_bullet);
12
        bul.speed = spd;
13
        bul.direction = _dir + a + b;
14
        bul.image_angle = bul.direction;
15
        bul.x += lengthdir_x(4, _dir + a);
16
        bul.y += lengthdir_y(4, _dir + a);
17
        bul = instance_create(x, y, obj_knight_bullethell_bullet);
18
        bul.speed = spd;
19
        bul.direction = _dir + a + b + 180;
20
        bul.image_angle = bul.direction;
21
        bul.x += lengthdir_x(4, _dir + a);
22
        bul.y += lengthdir_y(4, _dir + a);
23
        a += (40 + c);
24
    }
25
    snd_stop(snd_heartshot_dr_b);
26
    snd_play_x(snd_heartshot_dr_b, 1, 0.8);
27
    a = 0;
28
    b -= 0.1;
29
}
30
if (i_ex(obj_knight_enemy) && global.turntimer < 1)
31
    instance_destroy();
32
if (timer > 70)
33
    instance_destroy();