Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_dojofx_front_Draw_0

(view raw script w/o annotations or w/e)
1
depth = 202;
2
if (global.fighting == 1)
3
{
4
    if (image_alpha < 1)
5
        image_alpha += 0.02;
6
    for (i = 0; i < 6; i++)
7
    {
8
        myy[i] = 0;
9
        exists[i] = 0;
10
        if (i <= 2)
11
        {
12
            if (global.char[i] != 0)
13
            {
14
                if (i_ex(global.charinstance[i]))
15
                {
16
                    exists[i] = 1;
17
                    instance[i] = global.charinstance[i];
18
                    width[i] = 80;
19
                    myy[i] = instance[i].y + (sprite_get_height(instance[i].idlesprite) * 2);
20
                    myx[i] = instance[i].x + 20;
21
                    if (global.char[i] == 2)
22
                        myx[i] += 15;
23
                    if (global.char[i] == 3)
24
                        myx[i] += 15;
25
                }
26
            }
27
        }
28
        if (i >= 3 && i <= 6)
29
        {
30
            if (i_ex(global.monsterinstance[i - 3]))
31
                exists[i] = 1;
32
            if (exists[i])
33
            {
34
                instance[i] = global.monsterinstance[i - 3];
35
                myx[i] = instance[i].x + (instance[i].sprite_width / 2);
36
                myy[i] = instance[i].y + instance[i].sprite_height;
37
                width[i] = global.monsterinstance[i - 3].sprite_width;
38
            }
39
        }
40
        if (exists[i] && i_ex(instance[i]))
41
        {
42
            if ((global.encounterno == 90 || global.encounterno == 91 || global.encounterno == 92 || global.encounterno == 93 || global.encounterno == 94) && i > 2)
43
            {
44
            }
45
            else
46
            {
47
                var lightHeight = 280;
48
                draw_sprite_pos(spr_whitegradientdown_40, 0, myx[i], myy[i] - lightHeight, myx[i], myy[i] - lightHeight, (myx[i] - (width[i] / 2)) + 2, myy[i] - 2, myx[i] + (width[i] / 2), myy[i] - 2, 0.25);
49
                draw_set_color(c_gray);
50
                draw_ellipse(myx[i] - (width[i] / 2), myy[i] + 4, myx[i] + (width[i] / 2), myy[i] - 10, false);
51
            }
52
        }
53
    }
54
    draw_set_alpha(1);
55
}
56
else if (image_alpha > 0)
57
{
58
    image_alpha -= 0.02;
59
}