Deltarune script viewer

← back to main script listing

gml_Object_obj_sneo_faceattack_Draw_0

(view raw script w/o annotations or w/e)
1
if (init == 1)
2
{
3
    if (type == 1 && obj_spamton_neo_enemy.eyeshp > 0)
4
        image_blend = merge_color(c_purple, blue_col, obj_spamton_neo_enemy.eyeshp / 16);
5
    if (type == 2 && obj_spamton_neo_enemy.nosehp > 0)
6
        image_blend = merge_color(c_purple, blue_col, obj_spamton_neo_enemy.nosehp / 16);
7
    if (type == 3 && obj_spamton_neo_enemy.mouthhp > 0)
8
        image_blend = merge_color(c_purple, blue_col, obj_spamton_neo_enemy.mouthhp / 16);
9
    if ((type == 1 && obj_spamton_neo_enemy.eyeshp < 1) || (type == 1 && image_index == 2))
10
        image_blend = c_white;
11
    if ((type == 2 && obj_spamton_neo_enemy.nosehp < 1) || (type == 2 && image_index == 2))
12
        image_blend = c_white;
13
    if ((type == 3 && obj_spamton_neo_enemy.mouthhp < 1) || (type == 3 && image_index == 4))
14
        image_blend = c_white;
15
    if (shootflashtimer > 0)
16
    {
17
        image_blend = c_yellow;
18
        shootflashtimer--;
19
    }
20
    if (hurtflashtimer > 0)
21
    {
22
        image_blend = c_red;
23
        hurtflashtimer--;
24
    }
25
    var hidesprite = 0;
26
    if (invincibilitytimer > 0)
27
    {
28
        if (invincibilitytimer == 10 || invincibilitytimer == 9 || invincibilitytimer == 6 || invincibilitytimer == 5 || invincibilitytimer == 3 || invincibilitytimer == 2)
29
            hidesprite = 1;
30
        invincibilitytimer--;
31
        image_blend = c_red;
32
    }
33
    if (hidesprite == 0)
34
        draw_self();
35
    draw_sprite_ext(spr_battlebg_0, 0, x - 3, y + 70, 2.4, 2, 0, blend, 1);
36
}