Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_tower_dog_controller_Other_24

(view raw script w/o annotations or w/e)
1
var cx = camerax();
2
var cy = cameray();
3
if (letterboxcon == 1)
4
{
5
    letterboxtimer++;
6
    if (letterboxtimer > 0 && letterboxtimer <= 10)
7
        bgalpha = lerp(0, 1, letterboxtimer / 10);
8
    if (letterboxtimer > 5 && letterboxtimer <= 10)
9
        linex1 = lerp(linex1, 0, (letterboxtimer - 5) / 5);
10
    if (letterboxtimer > 5 && letterboxtimer <= 10)
11
        linex2 = lerp(linex2, 640, (letterboxtimer - 5) / 5);
12
    if (letterboxtimer > 10)
13
        linealpha -= 0.25;
14
    if (letterboxtimer == 10)
15
    {
16
        y2 = 240;
17
        y6 = 240;
18
        battlebgalpha = 1;
19
        letterboxalpha = 1;
20
        bgalpha = 0;
21
    }
22
    if (letterboxtimer > 10 && letterboxtimer <= 16)
23
    {
24
        y2 = lerp(y2, 180, (letterboxtimer - 10) / 6);
25
        y6 = lerp(y6, 300, (letterboxtimer - 10) / 6);
26
    }
27
    if (letterboxtimer > 15 && letterboxtimer < 45)
28
        dogx = lerp(dogx, 500, 0.2);
29
    if (letterboxtimer == 14)
30
        snd_play(snd_dogrev);
31
    if (letterboxtimer == 14)
32
        snd_play(snd_dograce_countdown);
33
    if (letterboxtimer == 30)
34
        
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; }
("dogx", dogx, -300, 20, 3, "in");
35
    if (letterboxtimer == 45)
36
    {
37
        
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; }
("y2", y2, 240, 7, 3, "in");
38
        
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; }
("y6", y6, 240, 7, 3, "in");
39
    }
40
    if (letterboxtimer >= 58)
41
    {
42
        letterboxalpha -= 0.2;
43
        battlebgalpha = 0;
44
    }
45
    if (letterboxtimer == 100)
46
    {
47
        letterboxcon = 2;
48
        letterboxtimer = 0;
49
    }
50
}
51
draw_set_alpha(bgalpha);
52
ossafe_fill_rectangle(0, 0, 640, 480, false);
53
draw_sprite_ext(spr_nothing, battlebgindex, 0, 180, 2, 2.9, 0, c_white, battlebgalpha);
54
draw_sprite_ext(spr_nothing, battlebgindex, 272, 180, 2, 2.9, 0, c_white, battlebgalpha);
55
draw_sprite_ext(spr_nothing, battlebgindex, 544, 180, 2, 2.9, 0, c_white, battlebgalpha);
56
battlebgindex += 0.5;
57
draw_set_alpha(letterboxalpha);
58
ossafe_fill_rectangle(0, 0, cx + 640, y2, false);
59
ossafe_fill_rectangle(0, cy + 480, cx + 640, y6, false);
60
draw_set_alpha(linealpha);
61
d_line_width_color(linex1, 240, linex2, 240, linewidth, 16777215, 16777215);
62
draw_set_alpha(1);