Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_musical_ring_bullet_fast_Draw_0

(view raw script w/o annotations or w/e)
1
if (con == 0)
2
{
3
    timer++;
4
    circle1alpha += 0.2;
5
    if (timer == 5)
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
        var a = random(120);
22
        for (i = 0; i < 1; i += 1)
23
        {
24
            bul = instance_create(x, y, obj_musical_note_bullet);
25
            if (i_ex(bul))
26
            {
27
                bul.sprite_index = spr_musical_notes;
28
                bul.grazepoints = 2;
29
                bul.timepoints = 1;
30
                bul.direction = point_direction(x, y, obj_heart.x, obj_heart.y);
31
                bul.speed = 2;
32
                bul.friction = 0;
33
            }
34
            a += 120;
35
        }
36
        con = 2;
37
        timer = 0;
38
    }
39
}
40
if (con == 2)
41
{
42
    timer++;
43
    circle1alpha += 0.2;
44
    circle2alpha -= 0.2;
45
    if (timer == 5)
46
        instance_destroy();
47
}
48
draw_set_alpha(circle1alpha);
49
draw_set_color(circle1color);
50
draw_sprite(s_kkHead, 0, x - 32, y - 21);
51
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);
52
draw_set_alpha(circle2alpha);
53
draw_set_color(c_white);
54
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);
55
draw_set_alpha(1);