Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_tree_grayscale_Step_0

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
{
3
    if (boss)
4
        image_blend = #FF3652;
5
    mysolid = instance_create(x, y, obj_board_solid);
6
    init = true;
7
}
8
if (active)
9
{
10
    
scr_depth_board
scr_depth_board

function
scr_depth_board()
{ depth = 1000000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10)); } function scr_board_depth() {
scr_depth_board();
}
();
11
    if (boss)
12
    {
13
        if (bosscon == 0)
14
        {
15
            if (myinteract == 3)
16
            {
17
                obj_b2heartisland.con = 1;
18
                bosscon = 0.1;
19
                
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("no_name");
20
                msgsetloc(0, 
YOU FOUND THE TROPIC OF LOVE!Wait for inputClose Message
"YOU FOUND \\cYTHE TROPIC OF LOVE\\cW!/%", "obj_board_tree_grayscale_slash_Step_0_gml_30_0"
);
21
                bw_make();
22
                global.interact = 1;
23
            }
24
        }
25
        if (bosscon == 0.1 && !bw_ex())
26
        {
27
            global.interact = 0;
28
            bosscon = 1;
29
        }
30
        if (bosscon == 1)
31
        {
32
            bosstimer++;
33
            if (bosstimer == 1)
34
            {
35
                with (object_index)
36
                    con = 0.1;
37
                snd_pause(global.currentsong[1]);
38
                var song = snd_init("ch3_south_of_the_border.ogg");
39
                coolbeat = snd_loop(song);
40
                bosscon = 2;
41
            }
42
        }
43
        if (bosscon == 2)
44
        {
45
            var endboat = false;
46
            with (obj_mainchara_board)
47
            {
48
                if (name == "kris")
49
                {
50
                    if (place_meeting(x, y, obj_board_dock))
51
                        endboat = true;
52
                }
53
            }
54
            if (endboat == true)
55
            {
56
                bosscon = 3;
57
                snd_volume(coolbeat, 0, 15);
58
                snd_volume(global.currentsong[1], 0, 0);
59
                snd_resume(global.currentsong[1]);
60
                mus_volume(global.currentsong[1], 1, 30);
61
                with (obj_board_tree_grayscale)
62
                {
63
                    safe_delete(mysolid);
64
                    
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; }
("y", y, -100, 60 + irandom(10), 2, "in");
65
                    
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; } }
(id, 60);
66
                }
67
            }
68
        }
69
    }
70
    if (i_ex(mysolid))
71
    {
72
        mysolid.x = x;
73
        mysolid.y = y;
74
    }
75
    if (!boss)
76
    {
77
        if (con == 1 && y <= 0)
78
            instance_destroy();
79
    }
80
    if (room == room_board_2_sword && boss)
81
    {
82
        if (bosscon == 72)
83
        {
84
            if (active && obj_board_camera.con == 0)
85
            {
86
                if (i_ex(obj_board_swordhitbox))
87
                {
88
                    if (place_meeting(x, y, obj_board_swordhitbox))
89
                    {
90
                        with (fakeground)
91
                        {
92
                            
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_index", 0, 4, 8);
93
                            
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; } }
(id, 10);
94
                        }
95
                        door = instance_create(x + 8, y + 8, obj_board_warptouch);
96
                        with (door)
97
                        {
98
                            warpx = 3584;
99
                            warpy = 1600;
100
                            playerX = 3776;
101
                            playerY = 1792;
102
                        }
103
                        safe_delete(mysolid);
104
                        instance_create(centerx(), centery(), obj_board_enemydefeatsplash);
105
                        snd_stop(snd_board_kill);
106
                        snd_play(snd_board_kill_ominous);
107
                        instance_destroy();
108
                    }
109
                }
110
            }
111
        }
112
    }
113
}