Deltarune (Chapter 5) script viewer

← back to main script listing

gml_GlobalScript_scr_flower_die

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

function
scr_flower_die(arg0 = 2, arg1 = 6, arg2 = 5, arg3 = 0, arg4 = true)
{ if (arg0 >= 3) { with (instance_create_depth(x, y, depth, obj_flowerdie_big)) { sprite_index = other.sprite_index; image_index = other.image_index; image_angle = other.image_angle; image_xscale = other.image_xscale; image_yscale = other.image_yscale; image_speed = other.image_speed; coindrops = arg3; use_image_speed = arg4; if (arg0 == 4) { wall_smash = true; if (other.image_xscale < 0) image_angle += 180; } } } else { with (instance_create_depth(x, y, depth, obj_flowerdie)) { speed = arg2; if (arg0 == 1) { sprite_index = spr_falling_petal; image_blend = c_gray; image_xscale = 2; image_yscale = 2; } amount = arg1; size = arg0; } if (arg0 == 1) instance_create_depth(x, y, depth - 5, obj_flowerdie_mini); if (arg3 == 0) exit; scr_plat_makecoins(x, y, -coindrops, 90, 90, 8, 4, depth); coindrops = 0; } }
(arg0 = 2, arg1 = 6, arg2 = 5, arg3 = 0, arg4 = true)
2
{
3
    if (arg0 >= 3)
4
    {
5
        with (instance_create_depth(x, y, depth, obj_flowerdie_big))
6
        {
7
            sprite_index = other.sprite_index;
8
            image_index = other.image_index;
9
            image_angle = other.image_angle;
10
            image_xscale = other.image_xscale;
11
            image_yscale = other.image_yscale;
12
            image_speed = other.image_speed;
13
            coindrops = arg3;
14
            use_image_speed = arg4;
15
            if (arg0 == 4)
16
            {
17
                wall_smash = true;
18
                if (other.image_xscale < 0)
19
                    image_angle += 180;
20
            }
21
        }
22
    }
23
    else
24
    {
25
        with (instance_create_depth(x, y, depth, obj_flowerdie))
26
        {
27
            speed = arg2;
28
            if (arg0 == 1)
29
            {
30
                sprite_index = spr_falling_petal;
31
                image_blend = c_gray;
32
                image_xscale = 2;
33
                image_yscale = 2;
34
            }
35
            amount = arg1;
36
            size = arg0;
37
        }
38
        if (arg0 == 1)
39
            instance_create_depth(x, y, depth - 5, obj_flowerdie_mini);
40
        if (arg3 == 0)
41
            exit;
42
        scr_plat_makecoins(x, y, -coindrops, 90, 90, 8, 4, depth);
43
        coindrops = 0;
44
    }
45
}