Deltarune script viewer

← back to main script listing

gml_Object_obj_musical_ring_bullet_multiple_old_Draw_0

(view raw script w/o annotations or w/e)
1
if (con == 0)
2
{
3
    timer++;
4
    circle1alpha += 0.1;
5
    if (timer == 10)
6
    {
7
        con = 1;
8
        timer = 0;
9
    }
10
}
11
if (con == 1)
12
{
13
    if (circle2alpha < 1)
14
        circle2alpha += 0.2;
15
    if (circle1radius < circle2radius)
16
    {
17
        circle2radius -= 2;
18
    }
19
    else
20
    {
21
        con = 2;
22
        timer = 0;
23
    }
24
}
25
if (con == 2)
26
{
27
    timer++;
28
    bullettimer++;
29
    if (timer == 3 || timer == 6 || timer == 9)
30
    {
31
        bul = instance_create(x, y, obj_musical_note_bullet);
32
        if (i_ex(bul))
33
        {
34
            bul.sprite_index = spr_musical_notes;
35
            bul.grazepoints = 2;
36
            bul.timepoints = 1;
37
            bul.direction = point_direction(x, y, obj_heart.x, obj_heart.y);
38
            bul.speed = 6;
39
            bul.friction = 0.1;
40
        }
41
    }
42
    if (timer == 10)
43
    {
44
        times--;
45
        if (times < 0)
46
        {
47
            con = 3;
48
        }
49
        else
50
        {
51
            con = 1;
52
            circle2alpha = 0;
53
            circle2radius = 75;
54
        }
55
        timer = 0;
56
    }
57
}
58
if (con == 3)
59
{
60
    timer++;
61
    circle1alpha += 0.2;
62
    circle2alpha -= 0.2;
63
    if (timer == 5)
64
        instance_destroy();
65
}
66
draw_set_alpha(circle1alpha);
67
draw_set_color(circle1color);
68
draw_sprite(spr_hatguy_head, 0, x, y);
69
scr_draw_circle_width_qb
scr_draw_circle_width_qb

function scr_draw_circle_width_qb(arg0, arg1, arg2, arg3, arg4) { var xx = arg0; var yy = arg1; var radius = arg2; var width = arg3; var steps = arg4; var h = width / 2; draw_primitive_begin(pr_trianglelist); for (i = 0; i < steps; i += 1) { draw_vertex(xx + lengthdir_x(radius - h, (360 * i) / steps), yy + lengthdir_y(radius - h, (360 * i) / steps)); draw_vertex(xx + lengthdir_x(radius + h, (360 * i) / steps), yy + lengthdir_y(radius + h, (360 * i) / steps)); draw_vertex(xx + lengthdir_x(radius + h, (360 * (i + 1)) / steps), yy + lengthdir_y(radius + h, (360 * (i + 1)) / steps)); draw_vertex(xx + lengthdir_x(radius + h, (360 * (i + 1)) / steps), yy + lengthdir_y(radius + h, (360 * (i + 1)) / steps)); draw_vertex(xx + lengthdir_x(radius - h, (360 * (i + 1)) / steps), yy + lengthdir_y(radius - h, (360 * (i + 1)) / steps)); draw_vertex(xx + lengthdir_x(radius - h, (360 * i) / steps), yy + lengthdir_y(radius - h, (360 * i) / steps)); } draw_primitive_end(); }
(x, y, circle1radius, circle1width, 24);
70
draw_set_alpha(circle2alpha);
71
draw_set_color(c_white);
72
scr_draw_circle_width_qb
scr_draw_circle_width_qb

function scr_draw_circle_width_qb(arg0, arg1, arg2, arg3, arg4) { var xx = arg0; var yy = arg1; var radius = arg2; var width = arg3; var steps = arg4; var h = width / 2; draw_primitive_begin(pr_trianglelist); for (i = 0; i < steps; i += 1) { draw_vertex(xx + lengthdir_x(radius - h, (360 * i) / steps), yy + lengthdir_y(radius - h, (360 * i) / steps)); draw_vertex(xx + lengthdir_x(radius + h, (360 * i) / steps), yy + lengthdir_y(radius + h, (360 * i) / steps)); draw_vertex(xx + lengthdir_x(radius + h, (360 * (i + 1)) / steps), yy + lengthdir_y(radius + h, (360 * (i + 1)) / steps)); draw_vertex(xx + lengthdir_x(radius + h, (360 * (i + 1)) / steps), yy + lengthdir_y(radius + h, (360 * (i + 1)) / steps)); draw_vertex(xx + lengthdir_x(radius - h, (360 * (i + 1)) / steps), yy + lengthdir_y(radius - h, (360 * (i + 1)) / steps)); draw_vertex(xx + lengthdir_x(radius - h, (360 * i) / steps), yy + lengthdir_y(radius - h, (360 * i) / steps)); } draw_primitive_end(); }
(x, y, circle2radius, circle2width, 24);
73
draw_set_alpha(1);