Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_climb_explosion_Step_0

(view raw script w/o annotations or w/e)
1
if (!init)
2
{
3
    init = true;
4
    part_type_direction(ptdebris, 45 + (90 * image_xscale), 135 + (90 * image_xscale), 0, 0);
5
    part_type_direction(btballs, 45 + (90 * image_xscale), 135 + (90 * image_xscale), 0, 0);
6
}
7
if (wing)
8
    wing.image_index = floor(current_time / 200) % 6;
9
if (con == 0)
10
{
11
    if (i_ex(obj_climb_kris))
12
    {
13
        if (obj_climb_kris.y < (y + 160))
14
        {
15
            con = 1;
16
            snd_play(snd_explosion, 0.5);
17
            if (dowing)
18
            {
19
                var marker = instance_create(x, y, obj_marker);
20
                wing = marker;
21
                marker.sprite_index = spr_climb_titanwing;
22
                marker.image_xscale = 0;
23
                marker.image_yscale = 0;
24
                marker.depth = obj_rotating_tower_controller_new.depth + 0.5;
25
                marker.image_speed = 0;
26
                with (marker)
27
                {
28
                    
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; }
("x", (x - 90) + (90 * other.image_xscale), x - (90 * other.image_xscale), 40, 1, "out");
29
                    
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_xscale", 0, other.image_xscale, 40, 1, "out");
30
                    
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_yscale", 0, 1, 40, 1, "out");
31
                }
32
            }
33
        }
34
    }
35
}
36
else if (con == 1)
37
{
38
    timer += 1;
39
    if (timer <= 21)
40
        obj_rotating_tower_controller_new.tower_xshake = clamp(10 - (timer * 0.5), 0, 4) * (((floor(20 - timer) % 2) * 2) - 1);
41
    if (timer == 8)
42
        part_emitter_burst(ps, pemitter, ptdebris, 15);
43
    if (timer >= 8 && timer <= 30)
44
        part_emitter_burst(bs, bemitter, btballs, 1);
45
    if (timer > 150)
46
        con = 2;
47
    if (timer > 15 && (timer % 4) == 0)
48
        part_emitter_burst(bs, bemitter, btballs, 1);
49
}