Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_dw_church_nwconnect_Step_0

(view raw script w/o annotations or w/e)
1
scr_populatechars
scr_populatechars

function
scr_populatechars()
{ if (!variable_instance_exists(id, "kris")) kris = 0; if (!variable_instance_exists(id, "ralsei")) ralsei = 0; if (!variable_instance_exists(id, "susie")) susie = 0; if (!variable_instance_exists(id, "noelle")) noelle = 0; if (kris == 0) { with (obj_mainchara) other.kris = id; } if (susie == 0) { with (obj_caterpillarchara) { if (name == "susie") other.susie = id; } } if (ralsei == 0) { with (obj_caterpillarchara) { if (name == "ralsei") other.ralsei = id; } } if (noelle == 0) { with (obj_caterpillarchara) { if (name == "noelle") other.noelle = id; } } }
();
2
if (!init)
3
{
4
    var slidemark = scr_genmarker("slidemarker");
5
    if (makeslide)
6
    {
7
        layer_set_visible("BG_SLIDE", true);
8
        with (instance_create(slidemark.x, slidemark.y, obj_darkslide_new))
9
            
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; } }
(slidemark.sprite_width, slidemark.sprite_height);
10
    }
11
    else
12
    {
13
        layer_set_visible("BG_SLIDE", false);
14
        with (instance_create(slidemark.x, slidemark.y, obj_solidblock))
15
            
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; } }
(slidemark.sprite_width, slidemark.sprite_height);
16
    }
17
    init = 1;
18
}