Undertale script viewer

← back to main script listing

gml_Object_obj_mhd_Draw_0

(view raw script w/o annotations or w/e)
1
if (spec == 0)
2
{
3
    for (i = 0; i < rno[0]; i += 1)
4
    {
5
        xx = x + lengthdir_x(r[0], rang[0] + ((i * 360) / rno[0]));
6
        yy = y + lengthdir_y(r[0], rang[0] + ((i * 360) / rno[0]));
7
        draw_sprite_ext(spr_monsterheart_place, 0, xx, yy, 1, 1, 0, c_white, image_alpha);
8
    }
9
}
10
if (spec == 1)
11
{
12
    for (i = 0; i < rno[0]; i += 1)
13
    {
14
        xx = x + lengthdir_x(r[0], rang[0] + ((i * 360) / rno[0]));
15
        yy = y + lengthdir_y(r[0], rang[0] + ((i * 360) / rno[0]));
16
        if (i == 0)
17
            col = 16776960;
18
        if (i == 1)
19
            col = 16711680;
20
        if (i == 2)
21
            col = 32768;
22
        if (i == 3)
23
            col = 65535;
24
        if (i == 4)
25
            col = 4235519;
26
        if (i == 5)
27
            col = 8388736;
28
        draw_sprite_ext(spr_humanheart_place, 0, xx, yy, 1, 1, 0, col, image_alpha);
29
    }
30
}
31
rang[0] += raspeed[0];
32
r[0] += rspeed[0];
33
if (image_alpha < 1)
34
    image_alpha += 0.02;
35
if (spec == 1)
36
{
37
    if (r[0] > 30)
38
    {
39
        r[0] = 30;
40
        alarm[5] = -1;
41
        rspeed[0] = 0;
42
        depth = -2;
43
    }
44
}