Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_sneo_heart_bomb_explode_Step_0

(view raw script w/o annotations or w/e)
1
timer++;
2
if (timer == 3 && image_index == 0)
3
{
4
    image_index = 1;
5
    timer = 0;
6
}
7
else if (timer == 3 && image_index == 1)
8
{
9
    image_index = 0;
10
    timer = 0;
11
}
12
siner += 4;
13
image_xscale = 2 + (sin(siner / 6) * 0.5);
14
image_yscale = 2 + (sin(siner / 6) * 0.5);
15
if (siner == 96)
16
{
17
    snd_play(snd_rocket);
18
    var a = random(44);
19
    repeat (8)
20
    {
21
        radialshot = instance_create(x, y, obj_sneo_heatattack_bullet);
22
        with (radialshot)
23
            
scr_bullet_init
scr_bullet_init

function
scr_bullet_init()
{ grazed = 0; grazetimer = 0; destroyonhit = 1; target = 0; inv = 60; damage = 10; element = 0; grazepoints = 1; timepoints = 1; active = 1; updateimageangle = 0; }
();
24
        radialshot.sprite_index = spr_diamondbullet;
25
        radialshot.direction = a;
26
        radialshot.image_angle = a;
27
        radialshot.active = 1;
28
        radialshot.speed = 1;
29
        radialshot.friction = -0.34;
30
        radialshot.depth = depth - 1;
31
        radialshot.target = target;
32
        radialshot.damage = damage;
33
        radialshot.grazed = 0;
34
        radialshot.newtype = 1;
35
        radialshot.element = 6;
36
        radialshot = instance_create(x, y, obj_sneo_heatattack_bullet);
37
        with (radialshot)
38
            
scr_bullet_init
scr_bullet_init

function
scr_bullet_init()
{ grazed = 0; grazetimer = 0; destroyonhit = 1; target = 0; inv = 60; damage = 10; element = 0; grazepoints = 1; timepoints = 1; active = 1; updateimageangle = 0; }
();
39
        radialshot.sprite_index = spr_diamondbullet;
40
        radialshot.direction = a + 10;
41
        radialshot.image_angle = a + 10;
42
        radialshot.active = 1;
43
        radialshot.speed = 1;
44
        radialshot.friction = -0.1;
45
        radialshot.depth = depth - 1;
46
        radialshot.target = target;
47
        radialshot.damage = damage;
48
        radialshot.grazed = 0;
49
        radialshot.newtype = 1;
50
        radialshot.element = 6;
51
        a += 45;
52
    }
53
    instance_destroy();
54
}