Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_sneo_biglaser_elevator_Draw_0

(view raw script w/o annotations or w/e)
1
if (!i_ex(parent))
2
{
3
    instance_destroy();
4
    exit;
5
}
6
if (parent != -1)
7
{
8
    x = parent.x + lengthdir_x(85, parent.image_angle + 268);
9
    y = parent.y + lengthdir_y(85, parent.image_angle + 268);
10
}
11
if (firecon == 0)
12
{
13
    image_yscale = 0.001;
14
    if (effecttimer <= 8 && (effecttimer % 6) == 0)
15
    {
16
        for (i = 0; i < 6; i++)
17
        {
18
            d = instance_create(x, y, obj_rouxls_power_up_orb);
19
            d.direction = irandom(60) + (i * 60);
20
            d.lifetime = 12;
21
            d.depth = depth + 1;
22
            d.image_blend = image_blend;
23
        }
24
    }
25
    if (effecttimer > 14)
26
        orbsize -= 8;
27
    else
28
        orbsize += 2;
29
    if (effecttimer == 18)
30
        firecon = 1;
31
    draw_set_color(c_white);
32
    draw_circle(x, y, max(2, (orbsize / 2) + (sin(siner / 2) * 2)), 0);
33
    effecttimer++;
34
    siner++;
35
}
36
else if (firecon == 1)
37
{
38
    active = true;
39
    draw_set_color(c_white);
40
    draw_circle(x, y, image_yscale * 100, 0);
41
    effecttimer++;
42
    if (effecttimer == 20)
43
    {
44
        bullet = instance_create(x + 30, ystart, obj_sneo_laser_bullet);
45
        bullet.sprite_index = spr_neo_heart_bullet_elevator;
46
        bullet.image_angle = 180;
47
        bullet.direction = 0;
48
        bullet.image_xscale = 1;
49
        bullet.image_yscale = 1;
50
        bullet.speed = -2;
51
        bullet.friction = -0.35;
52
    }
53
    if (effecttimer == 27)
54
        firecon = 2;
55
}
56
else if (firecon == 2)
57
{
58
    draw_set_color(c_white);
59
    active = 0;
60
    draw_circle(x, y, image_yscale * 100, 0);
61
    draw_self();
62
}