Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_knight_bullethell1_Step_0

(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_bounce);
10
    bul.speed = spd;
11
    bul.direction = _dir;
12
    bul.image_angle = bul.direction;
13
    bul.x += lengthdir_x(4, _dir + a);
14
    bul.y += lengthdir_y(4, _dir + a);
15
    snd_stop(snd_heartshot_dr_b);
16
    snd_play_x(snd_heartshot_dr_b, 1, 0.8);
17
    a = 0;
18
    c += 0.26;
19
}
20
if (i_ex(obj_knight_enemy) && global.turntimer < 1)
21
    instance_destroy();
22
if (timer > 70)
23
    instance_destroy();