Deltarune (Chapter 5) script viewer

← back to main script listing

gml_GlobalScript_scr_blue_petal_explosion

(view raw script w/o annotations or w/e)
1
function 
scr_blue_petal_explosion
scr_blue_petal_explosion

function
scr_blue_petal_explosion()
{ var randangle = choose(0, 22.5, -22.5); for (a = 0; a < 8; a++) { with (
scr_fire_bullet(x, y, obj_regularbullet, (45 * a) + randangle, 9, spr_enemy_blue_bullet_petal, 0, true))
{ speed -= ((other.a % 2) * 3); image_xscale = 1; image_yscale = 4; image_angle = direction; gravity_direction = direction; friction = -0.3;
scr_lerpvar("speed", speed, 1, 8);
scr_lerpvar("image_xscale", 1, 2, 8);
scr_lerpvar("image_yscale", 4, 2, 8);
} } snd_play(snd_bomb); beam_x = obj_yellow_enemy.x; beam_y = obj_yellow_enemy.y + 46; with (instance_create_depth(x, y, depth - 1, obj_yellow_beam)) setup(obj_yellow_enemy.x, obj_yellow_enemy.y + 46, x, y, 12, 0, 16, 8, 32); instance_destroy(); }
()
2
{
3
    var randangle = choose(0, 22.5, -22.5);
4
    for (a = 0; a < 8; a++)
5
    {
6
        with (
scr_fire_bullet
scr_fire_bullet

function
scr_fire_bullet(arg0, arg1, arg2, arg3, arg4, arg5 = -4, arg6 = 0, arg7 = false, arg8 = 87135)
{ var bullet; if (arg8 != 87135) bullet = instance_create_depth(arg0, arg1, arg8, arg2); else bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; if (arg5 != -4) sprite_index = arg5; updateimageangle = arg6; if (arg6) image_angle = arg3; if (arg7) { with (other)
scr_bullet_inherit(other.id);
} } return bullet; } function scr_fire_bullet_colorize(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 = 0) { var bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; sprite_index = arg5; image_blend = arg6; updateimageangle = arg7; if (arg7) image_angle = arg3; } return bullet; }
(x, y, obj_regularbullet, (45 * a) + randangle, 9, spr_enemy_blue_bullet_petal, 0, true))
7
        {
8
            speed -= ((other.a % 2) * 3);
9
            image_xscale = 1;
10
            image_yscale = 4;
11
            image_angle = direction;
12
            gravity_direction = direction;
13
            friction = -0.3;
14
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("speed", speed, 1, 8);
15
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("image_xscale", 1, 2, 8);
16
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("image_yscale", 4, 2, 8);
17
        }
18
    }
19
    snd_play(snd_bomb);
20
    beam_x = obj_yellow_enemy.x;
21
    beam_y = obj_yellow_enemy.y + 46;
22
    with (instance_create_depth(x, y, depth - 1, obj_yellow_beam))
23
        setup(obj_yellow_enemy.x, obj_yellow_enemy.y + 46, x, y, 12, 0, 16, 8, 32);
24
    instance_destroy();
25
}