Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_dbullet_maker_Draw_0

(view raw script w/o annotations or w/e)
1
if (dont == 0)
2
{
3
    if (active == 0)
4
    {
5
        futuredir = point_direction(x, y, obj_heart.x + 8, obj_heart.y + 8);
6
        if (netskiebullet)
7
            draw_sprite_ext(spr_triangle_netskie_form, 0, x, y, 4 - (image_alpha * 2), 3 - (image_alpha * 2), futuredir, c_white, 1 - image_alpha);
8
        else
9
            draw_sprite_ext(spr_triangle_form, 0, x, y, 4 - (image_alpha * 2), 3 - (image_alpha * 2), futuredir, c_white, 1 - image_alpha);
10
        if (image_alpha < 1)
11
        {
12
            image_alpha += 0.1;
13
        }
14
        else
15
        {
16
            move_towards_point(obj_heart.x + 8, obj_heart.y + 8, 2);
17
            futuredir = direction;
18
            active = 1;
19
            speed = 0;
20
        }
21
    }
22
    draw_sprite_ext(sprite_index, 0, x, y, 3 - image_alpha, 2 - image_alpha, futuredir, c_white, image_alpha);
23
    if (active == 1)
24
    {
25
        activetimer += 1;
26
        if (activetimer >= 5 && times < difficulty)
27
        {
28
            mybul = instance_create(x, y, obj_spike_bullet);
29
            if (i_ex(mybul))
30
            {
31
                mybul.grazepoints = grazepoints;
32
                mybul.damage = damage;
33
                mybul.target = target;
34
                mybul.grazepoints = 4;
35
                mybul.sprite_index = spr_triangle;
36
                mybul.direction = futuredir;
37
                mybul.image_xscale = 2;
38
                mybul.depth = depth - 1;
39
                with (mybul)
40
                {
41
                    speed = 12;
42
                    if (other.netskie)
43
                        speed = 8;
44
                    image_angle = direction;
45
                    var aa = 0;
46
                    for (var i = 0; i < instance_number(obj_dbulletcontroller); i++)
47
                    {
48
                        dbul[i] = instance_find(obj_dbulletcontroller, i);
49
                        if (dbul[i].type == 141)
50
                            aa = 1;
51
                    }
52
                    if (aa == 1)
53
                    {
54
                        speed = 6;
55
                    }
56
                    else
57
                    {
58
                        
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("speed", 0, speed, 15, -1, "in");
59
                        speed = 0;
60
                    }
61
                }
62
                if (netskiebullet)
63
                {
64
                    mybul.sprite_index = spr_triangle_netskie;
65
                    mybul.speed = 6;
66
                    mybul.image_xscale = 1;
67
                    mybul.image_yscale = 1;
68
                }
69
            }
70
            times += 1;
71
            activetimer = 0;
72
        }
73
        if (activetimer >= 5 && times >= difficulty)
74
        {
75
            image_alpha -= 0.2;
76
            if (image_alpha <= 0)
77
                instance_destroy();
78
        }
79
    }
80
}
81
dont = 0;