Undertale script viewer

← back to main script listing

gml_Object_obj_asgore_firehit_Draw_0

(view raw script w/o annotations or w/e)
1
if (con < 3)
2
{
3
    draw_sprite_ext(sprite_index, image_index, x, y, 2, 2, 0, image_blend, 1);
4
    draw_sprite_ext(spr_asgore_bface, global.faceemotion, x + 138, y - 12, 2, 2, 0, c_white, 1);
5
}
6
if (con == 1)
7
{
8
    if (onoff == 0)
9
        onoff = 1;
10
    else
11
        onoff = 0;
12
    if (onoff == 0)
13
        draw_sprite_ext(spr_torielflame, 0, x + 360, y + 100, 2, 2, 0, image_blend, 1);
14
    firetimer += 1;
15
    if (firetimer > 40)
16
    {
17
        snd_play(snd_noise);
18
        kk = 0;
19
        firetimer = 0;
20
        con = 1.5;
21
        alarm[4] = 40;
22
    }
23
}
24
if (con == 1.5)
25
{
26
    global.faceemotion = 3;
27
    kk += 1;
28
    draw_sprite_ext(spr_torielflame, floor(kk / 4), (x + 360) - (firetimer * 10), y + 100, 2, 2, 0, image_blend, 1);
29
}
30
if (con == 2.5)
31
    con = 2;
32
if (con == 2)
33
{
34
    firetimer += 1;
35
    draw_sprite_ext(spr_torielflame, floor(firetimer / 4), (x + 360) - (firetimer * 20), y + 100, 2, 2, 0, image_blend, 1);
36
    if (firetimer > 9)
37
    {
38
        snd_play(snd_damage);
39
        con = 3;
40
        alarm[4] = 120;
41
    }
42
}
43
if (con == 3)
44
{
45
    hspeed = -20;
46
    vspeed = -4;
47
    gravity = 10;
48
    gravity_direction = 270;
49
    image_angle += 3;
50
    draw_sprite_ext(spr_asgore_hit, image_index, x, y, 2, 2, image_angle, image_blend, 1);
51
}
52
if (con == 4)
53
    instance_destroy();