Deltarune (Chapter 5) script viewer

← back to main script listing

gml_GlobalScript_scr_plat_vfx

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

function
scr_plat_vfx(arg0)
{ var _vfx = instance_create_depth(x, y, depth, obj_plat_vfx); _vfx.sprite_index = arg0; return _vfx; } function scr_vfx_above(arg0) { var _vfx = instance_create_depth(x, y, depth - 1, obj_plat_vfx); _vfx.sprite_index = arg0; return _vfx; } function scr_plat_vfx_ringhit(arg0, arg1, arg2, arg3) {
scr_make_ripple(arg0, arg1, 80, arg3, 280, 2, 20, depth, 0, 0, 0, 1, 0.8);
scr_make_ripple(arg0, arg1, 120, arg3, 480, 2, 15, depth, 0, 0, 0, 1, 0.8);
scr_make_ripple(arg0, arg1, 160, arg3, 680, 2, 10, depth, 0, 0, 0, 1, 0.8);
repeat (7) { with (instance_create(arg0, arg1, obj_animation)) { sprite_index = spr_plat_impact_splash; direction = random_range(0, 360); speed = random_range(3, 12); friction = 0.8; image_speed = 0.3; image_angle = direction;
scr_darksize();
image_blend = arg3; } } }
(arg0)
2
{
3
    var _vfx = instance_create_depth(x, y, depth, obj_plat_vfx);
4
    _vfx.sprite_index = arg0;
5
    return _vfx;
6
}
7
8
function scr_vfx_above(arg0)
9
{
10
    var _vfx = instance_create_depth(x, y, depth - 1, obj_plat_vfx);
11
    _vfx.sprite_index = arg0;
12
    return _vfx;
13
}
14
15
function scr_plat_vfx_ringhit(arg0, arg1, arg2, arg3)
16
{
17
    
scr_make_ripple
scr_make_ripple

function
scr_make_ripple(arg0, arg1, arg2 = 60, arg3 = 16159050, arg4 = 160, arg5 = 1, arg6 = 15, arg7 = 1999000, arg8 = 0, arg9 = 0, arg10 = 0.1, arg11 = 0, arg12 = 1, arg13 = 0, arg14 = 0, arg15 = true)
{ var _ripple = -4; var _found = false; if (instance_exists(obj_ripples)) { with (obj_ripples) { if (depth == arg7) { _found = true; _ripple = MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11, arg12, arg13, arg14, arg15); blend = arg13; } } } if (!_found) { with (instance_create_depth(0, 0, arg7, obj_ripples)) { _ripple = MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11, arg12, arg13, arg14, arg15); blend = arg13; } } return _ripple; }
(arg0, arg1, 80, arg3, 280, 2, 20, depth, 0, 0, 0, 1, 0.8);
18
    
scr_make_ripple
scr_make_ripple

function
scr_make_ripple(arg0, arg1, arg2 = 60, arg3 = 16159050, arg4 = 160, arg5 = 1, arg6 = 15, arg7 = 1999000, arg8 = 0, arg9 = 0, arg10 = 0.1, arg11 = 0, arg12 = 1, arg13 = 0, arg14 = 0, arg15 = true)
{ var _ripple = -4; var _found = false; if (instance_exists(obj_ripples)) { with (obj_ripples) { if (depth == arg7) { _found = true; _ripple = MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11, arg12, arg13, arg14, arg15); blend = arg13; } } } if (!_found) { with (instance_create_depth(0, 0, arg7, obj_ripples)) { _ripple = MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11, arg12, arg13, arg14, arg15); blend = arg13; } } return _ripple; }
(arg0, arg1, 120, arg3, 480, 2, 15, depth, 0, 0, 0, 1, 0.8);
19
    
scr_make_ripple
scr_make_ripple

function
scr_make_ripple(arg0, arg1, arg2 = 60, arg3 = 16159050, arg4 = 160, arg5 = 1, arg6 = 15, arg7 = 1999000, arg8 = 0, arg9 = 0, arg10 = 0.1, arg11 = 0, arg12 = 1, arg13 = 0, arg14 = 0, arg15 = true)
{ var _ripple = -4; var _found = false; if (instance_exists(obj_ripples)) { with (obj_ripples) { if (depth == arg7) { _found = true; _ripple = MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11, arg12, arg13, arg14, arg15); blend = arg13; } } } if (!_found) { with (instance_create_depth(0, 0, arg7, obj_ripples)) { _ripple = MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11, arg12, arg13, arg14, arg15); blend = arg13; } } return _ripple; }
(arg0, arg1, 160, arg3, 680, 2, 10, depth, 0, 0, 0, 1, 0.8);
20
    repeat (7)
21
    {
22
        with (instance_create(arg0, arg1, obj_animation))
23
        {
24
            sprite_index = spr_plat_impact_splash;
25
            direction = random_range(0, 360);
26
            speed = random_range(3, 12);
27
            friction = 0.8;
28
            image_speed = 0.3;
29
            image_angle = direction;
30
            
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
31
            image_blend = arg3;
32
        }
33
    }
34
}