Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_heroparent_Draw_0

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