Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_darkness_bullet_Step_0

(view raw script w/o annotations or w/e)
1
if (!init)
2
{
3
    if (lightBullet)
4
    {
5
        image_blend = c_orange;
6
        var _sprite_index = sprite_index;
7
        sprite_index = dark_sprite;
8
        dark_sprite = _sprite_index;
9
    }
10
    else
11
    {
12
        image_blend = c_fuchsia;
13
    }
14
    init = true;
15
    active = true;
16
    if (special == 1)
17
    {
18
        gravity = 0.15;
19
        gravity_direction = direction - 180;
20
        destroytimer = scr_gettime_fromvelocity(0.15, speed) * 2;
21
    }
22
}
23
if (collision_ellipse(bbox_left - 20, bbox_top - 20, bbox_right + 20, bbox_bottom + 20, obj_dw_church_pushableshelf_3x3, false, true))
24
    instance_destroy();
25
if (despawning)
26
{
27
    image_alpha -= 0.1;
28
    if (image_alpha <= 0)
29
        instance_destroy();
30
}
31
if (image_alpha < 1)
32
    image_alpha += 0.1;