Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_dw_churchc_encounter2_Other_11

(view raw script w/o annotations or w/e)
1
with (obj_trigger)
2
{
3
    if (extflag == "BLACKOUT")
4
    {
5
        with (instance_create(x, y, obj_solidblock))
6
        {
7
            visible = true;
8
            depth = layer_get_depth("RIPPLEWALLS") - 10;
9
            sprite_index = spr_pxwhite;
10
            
scr_sizeexact
scr_sizeexact

function
scr_sizeexact(arg0, arg1, arg2 = id)
{ with (arg2) { if (!sprite_exists(sprite_index)) { debug_message("Can't size, no sprite"); exit; } var _w = sprite_get_width(sprite_index); var _h = sprite_get_width(sprite_index); image_xscale = arg0 / _w; image_yscale = arg1 / _h; } }
(other.sprite_width, other.sprite_height);
11
            image_blend = c_black;
12
            image_alpha = 0;
13
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ 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_lerpvar_respect() { 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]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("image_alpha", 0, 1, 6);
14
        }
15
        var _list = ds_list_create();
16
        var _num = instance_place_list(x, y, 769, _list, false);
17
        if (_num > 0)
18
        {
19
            for (var i = 0; i < _num; i++)
20
                instance_destroy(ds_list_find_value(_list, i));
21
        }
22
        ds_list_destroy(_list);
23
        instance_destroy();
24
    }
25
}