Undertale script viewer

← back to main script listing

gml_Object_obj_6pan_Draw_0

(view raw script w/o annotations or w/e)
1
siner += 1;
2
draw_set_color(c_black);
3
xox = lengthdir_x(220, rot + 180);
4
yoy = lengthdir_y(220, rot + 180);
5
draw_triangle(x, y, x + xox, y + yoy, -20 + x + (xox / 2), y + 80, 0);
6
if (ss == 1)
7
{
8
    x += (sin(siner / 3) * 5);
9
    y += (cos(siner / 2) * 2);
10
}
11
if (image_index == 0)
12
    draw_sprite_ext(sprite_index, 0, x, y, image_xscale, image_yscale, rot, c_white, image_alpha);
13
if (image_index == 1)
14
    draw_sprite_ext(sprite_index, 1, x, y, image_xscale, image_yscale, rot + 40, c_white, image_alpha);
15
counter += 1;
16
if (counter > 57 && counter < 60)
17
    rot += 2;
18
if (counter > 60 && counter < 62)
19
{
20
    rot -= 8;
21
    if (spec == 1)
22
        num += 1;
23
    if (num != 12)
24
    {
25
        xox = lengthdir_x(150, rot + 180);
26
        yoy = lengthdir_x(70, rot + 180);
27
        fr = instance_create(x + xox, y + yoy, obj_6pan_fire);
28
        fr.gravity += 0.1 + random(0.08);
29
        fr = instance_create(x + xox, y + yoy, obj_6pan_fire);
30
        fr = instance_create(x + xox, y + yoy, obj_6pan_fire);
31
        fr.gravity += 0.07 + random(0.06);
32
        fr = instance_create(x + xox, y + yoy, obj_6pan_fire);
33
        fr.gravity += 0.05 + random(0.04);
34
        fr.panparent = id;
35
    }
36
    else
37
    {
38
        act = instance_create(x - 140, y - 10, obj_6pan_act);
39
    }
40
}
41
if (counter >= 63 && counter < 67)
42
    rot -= 3;
43
if (counter >= 63 && counter < 72)
44
    ss = 0;
45
if (counter > 70 && counter < 72)
46
    rot += 6;
47
if (counter >= 72)
48
{
49
    image_index = 0;
50
    rot += 5;
51
    if (rot > 3)
52
    {
53
        ss = 1;
54
        rot = 0;
55
        counter = 50;
56
        if (num == 12)
57
            counter = -20;
58
    }
59
}