Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_heroparent_Draw_0

(view raw script w/o annotations or w/e)
1
if (global.chapter == 4 && showdarkness && (global.encounterno == 176 || global.encounterno == 186))
2
    d3d_set_fog(true, c_black, 0, 1);
3
if (hurt == 1 && state != 8 && global.hp[global.char[myself]] > 0)
4
{
5
    if (global.faceaction[myself] != 4)
6
    {
7
        specdraw = 1;
8
        draw_sprite_ext(hurtsprite, hurtindex, (x - 20) + (hurtindex * 10), y, 2, 2, 0, image_blend, image_alpha);
9
    }
10
    else
11
    {
12
        specdraw = 1;
13
        thissprite = defendsprite;
14
        index = defendtimer;
15
        draw_sprite_ext(defendsprite, defendtimer, (x - 20) + (hurtindex * 10), y, 2, 2, 0, image_blend, image_alpha);
16
    }
17
}
18
if (specdraw == 0 && state != 8)
19
{
20
    sprite_index = thissprite;
21
    image_index = index;
22
    if (image_xscale == -2)
23
        draw_sprite_ext(thissprite, index, x, y, -2, 2, 0, image_blend, image_alpha);
24
    else
25
        draw_sprite_ext(thissprite, index, x, y, 2, 2, 0, image_blend, image_alpha);
26
    if (flash == 1)
27
    {
28
        fsiner += 1;
29
        d3d_set_fog(true, c_white, 0, 1);
30
        draw_sprite_ext(thissprite, index, x, y, 2, 2, 0, image_blend, (-cos(fsiner / 5) * 0.4) + 0.6);
31
        d3d_set_fog(false, c_black, 0, 0);
32
    }
33
}
34
if (state == 8)
35
    draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
36
specdraw = 0;
37
if (becomeflash == 0)
38
    flash = 0;
39
becomeflash = 0;
40
if (global.targeted[myself] == 1 && global.mnfight == 1 && global.chapter == 1)
41
    draw_sprite_ext(spr_chartarget, siner / 10, x, y, 2, 2, 0, c_white, 1);
42
if (global.chapter == 4 && showdarkness && (global.encounterno == 176 || global.encounterno == 186))
43
    d3d_set_fog(false, c_black, 0, 0);