Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_tasque_manager_enemy_Draw_0

(view raw script w/o annotations or w/e)
1
if (instance_exists(obj_tm_whip_animation) && obj_tm_whip_animation.visible == true)
2
    exit;
3
if (state == 3)
4
    
scr_enemy_drawhurt_generic
scr_enemy_drawhurt_generic

function
scr_enemy_drawhurt_generic()
{ if (state == 3 && hurttimer >= 0) draw_sprite_ext(hurtsprite, 0, x + shakex + hurtspriteoffx, y + hurtspriteoffy, 2, 2, 0, image_blend, 1); }
();
5
if (state == 0)
6
{
7
    if (flash == 1)
8
        fsiner++;
9
    var mercy = global.mercymod[myself] >= global.mercymax[myself];
10
    timer += 1.5;
11
    var tailsprite = mercy ? sparesprite[2] : sprite[2];
12
    draw_monster_body_part_ext(tailsprite, 0, x + xOffset[2], y + yOffset[2], 2, 2, -sin(timer / 6) * 10, c_white, image_alpha);
13
    var handSprite = mercy ? sparesprite[4] : sprite[4];
14
    draw_monster_body_part_ext(handSprite, 0, x + xOffset[4] + (sin(timer / 6) * 2), y + yOffset[4] + (sin(timer / 6) * 2), 2, 2, 0, c_white, image_alpha);
15
    var whipSprite = mercy ? sparesprite[3] : sprite[3];
16
    draw_monster_body_part_ext(whipSprite, 0, x + xOffset[3] + (cos(timer / 6) * 2), y + yOffset[3] + (sin(timer / 6) * 2), 2, 2, sin(timer / 6) * 15, c_white, image_alpha);
17
    var legSprite = mercy ? sparesprite[5] : sprite[5];
18
    draw_monster_body_part_ext(legSprite, 0, x + xOffset[5] + (sin(timer / 6) * 0), y + yOffset[5], 2, 2, 0, c_white, image_alpha);
19
    var bodySprite = mercy ? sparesprite[1] : sprite[1];
20
    draw_monster_body_part_ext(bodySprite, 0, x + xOffset[1], y + yOffset[1] + (sin(timer / 6) * 2), 2, 2, 0, c_white, image_alpha);
21
    var headSprite = mercy ? sparesprite[0] : sprite[0];
22
    draw_monster_body_part_ext(headSprite, 0, x + xOffset[0], y + yOffset[0] + (sin(timer / 6) * 3), 2, 2, sin(timer / 6) * 10, c_white, image_alpha);
23
}
24
if (becomeflash == 0)
25
    flash = 0;
26
becomeflash = 0;