Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_ch3_b3bs_trashcan_Step_1

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

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
2
if (init == 0)
3
{
4
    image_index = global.flag[itemflag];
5
    init = 1;
6
    if (!variable_instance_exists(id, "itemflag"))
7
        itemflag = -1;
8
    if (!variable_instance_exists(id, "itemtype"))
9
        itemtype = "item";
10
    if (!variable_instance_exists(id, "itemidchest"))
11
        itemidchest = 0;
12
    if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
13
    {
14
        if (itemidchest == -1 && (itemtype == "item" || itemtype == "armor"))
15
        {
16
            flag = true;
17
            itemidchest = 0;
18
        }
19
    }
20
}
21
if (myinteract == 0)
22
{
23
    if (close == 1)
24
        image_index = 0;
25
    close = 0;
26
}