Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_ch2_scene26_powers_combined_old_Draw_0

(view raw script w/o annotations or w/e)
1
if (fade_in_out)
2
    draw_sprite_ext_flash(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, merge_color(start_color, end_color, color_lerp), 1);
3
else
4
    draw_self();
5
for (i = 0; i < orb_count; i++)
6
{
7
    draw_set_color(c_white);
8
    var _distance = 200 + (sin(orbsiner / 30) * 10);
9
    var _rotation = orb_spin;
10
    var _yaw = orb_yaw;
11
    if (i == (orb_count - 1) || orb_con == 2)
12
    {
13
        _distance *= orb_ease;
14
        _rotation += ((360 / orb_count) * i);
15
        _yaw += ((360 / orb_count) * i);
16
    }
17
    else
18
    {
19
        _yaw += ((360 / (orb_count - (1 - orb_ease))) * i);
20
        _rotation += ((360 / (orb_count - (1 - orb_ease))) * i);
21
    }
22
    xx = x + (sin((_rotation / 180) * pi) * _distance);
23
    yy = y + (cos((_yaw / 180) * pi) * _distance);
24
    draw_set_alpha(1);
25
    draw_set_color(c_white);
26
    draw_circle(xx, yy, 16 + (((i + flicker_timer) % 2) * 2), 0);
27
    draw_set_color(#8EAAEA);
28
    draw_circle(xx, yy, 20 - (((i + flicker_timer) % 2) * 2), 0);
29
    draw_set_color(c_white);
30
}
31
orb_spin = (orb_spin - spin_speed) % 360;
32
orb_siner += spin_speed;
33
orb_yaw = orb_spin;
34
flicker_timer = 1 - flicker_timer;
35
if (orb_con == 0 && orb_ease < 1)
36
{
37
    orb_ease += 0.05;
38
}
39
else if (orb_con == 1)
40
{
41
    spin_speed += 0.5;
42
    if (spin_speed > 20)
43
        orb_con = 2;
44
}
45
else if (orb_con == 2)
46
{
47
    orb_ease -= 0.01;
48
}