Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_holemouse_block_clockwise_moveable_Step_0

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

function
scr_depth()
{ depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
2
if (movecourse == 1)
3
{
4
    if (movedir == 1)
5
        x += 8;
6
    if (movedir == 0)
7
        y += 8;
8
    if (movedir == 2)
9
        y -= 8;
10
    if (movedir == 3)
11
        x -= 8;
12
    movetimer += 1;
13
    if (movetimer >= 5)
14
    {
15
        movetimer = 0;
16
        global.interact = 0;
17
        movecourse = 0;
18
    }
19
}
20
if (myinteract == 3)
21
{
22
    if (i_ex(mydialoguer) == false)
23
    {
24
        global.interact = 0;
25
        myinteract = 0;
26
        with (obj_mainchara)
27
            onebuffer = 5;
28
    }
29
}
30
if (reset == true)
31
{
32
    if (con == 0)
33
    {
34
        image_alpha *= 0.6;
35
        if (image_alpha < 0.1)
36
        {
37
            image_alpha = 0;
38
            x = xpos;
39
            y = ypos;
40
            con = 1;
41
            pause = 0;
42
        }
43
    }
44
    if (con == 1)
45
    {
46
        pause++;
47
        if (pause == 10)
48
        {
49
            image_alpha = 0.1;
50
            con = 2;
51
        }
52
    }
53
    if (con == 2)
54
    {
55
        image_alpha *= 1.4;
56
        if (image_alpha >= 1)
57
        {
58
            image_alpha = 1;
59
            con = 0;
60
            reset = 0;
61
            global.interact = 0;
62
        }
63
    }
64
}