Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_rainwater_Step_0

(view raw script w/o annotations or w/e)
1
event_inherited();
2
timer++;
3
if ((timer % 6) == 0)
4
    grazed = 0;
5
with (obj_bullet_rain)
6
{
7
    if (other.y < y && !spent)
8
    {
9
        other.y = 
scr_approach_curve
scr_approach_curve

function
scr_approach_curve(arg0, arg1, arg2)
{ return
scr_approach(arg0, arg1, max(0.1, abs(arg1 - arg0) / arg2));
}
(other.y, obj_growtangle.y - 45, 35 + (15 * overpower));
10
        spent = true;
11
        repeat (2)
12
        {
13
            with (instance_create(x, y, obj_bulletparent))
14
            {
15
                hspeed = -2 + random(3);
16
                vspeed = -3 - random(2);
17
                gravity = 0.25;
18
                sprite_index = spr_ball;
19
                image_speed = 0;
20
                image_blend = c_gray;
21
                image_xscale = 0.1;
22
                image_yscale = 0.1;
23
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ 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_lerpvar_respect() { 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]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("image_alpha", 1, 0, 30);
24
            }
25
        }
26
    }
27
}
28
with (obj_bullet_submoon)
29
{
30
    if (!touched_water)
31
    {
32
        if (place_meeting(x, y, other.id))
33
        {
34
            image_xscale *= 0.96;
35
            image_yscale *= 0.96;
36
            repeat (9)
37
            {
38
                with (instance_create((x + random(16)) - 8, other.y, obj_bulletparent))
39
                {
40
                    hspeed = -2 + random(3) + other.hspeed;
41
                    vspeed = -3 - random(2);
42
                    gravity = 0.25;
43
                    sprite_index = spr_ball;
44
                    image_speed = 0;
45
                    image_blend = c_gray;
46
                    image_xscale = 0.1;
47
                    image_yscale = 0.1;
48
                    
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ 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_lerpvar_respect() { 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]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("image_alpha", 1, 0, 30);
49
                    
scr_script_delayed
scr_script_delayed

function
scr_script_delayed()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; }
(instance_destroy, 30);
50
                }
51
            }
52
            touched_water = true;
53
        }
54
    }
55
}