Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_b2s_icedoor_Step_0

(view raw script w/o annotations or w/e)
1
if (kris == 0)
2
{
3
    with (obj_mainchara_board)
4
        other.kris = id;
5
}
6
buffer--;
7
if (myinteract == 3)
8
{
9
    if (con == 0)
10
    {
11
        con = 1;
12
        kris.controlled = false;
13
        snd_free_all();
14
        
scr_pathfind_to_point
scr_pathfind_to_point

function
scr_pathfind_to_point(arg0, arg1, arg2)
{ var __destx = arg1 + 16; var __desty = arg2 + 16; if (arg1 < 12 && arg2 < 8) { __destx = 128 + (32 * arg1) + 16; __desty = 64 + (32 * arg2) + 16; } with (obj_mainchara_board) { if (name == arg0) { path_end(); is_moving_timer = 0; is_moving = true; path_target_x = __destx; path_target_y = __desty; follow = false; if (argument_count == 4) { if (argument3 != -1) path_end_facing = argument3; } if (argument_count == 5) { if (argument4 != -1) allow_diagonals = argument4; } } } }
("kris", 5.5, 4, 2);
15
    }
16
}
17
if (con == 1 && 
scr_board_checklocation
scr_board_checklocation

function
scr_board_checklocation()
{ var _name = argument0; var _xloc = argument1; var _yloc = argument2; if (_xloc < 12) _xloc = board_tilex(_xloc); if (_yloc < 12) _yloc = board_tiley(_yloc); var _tol = 4; if (argument_count == 4) _tol = argument3; var targ = 0; with (obj_mainchara_board) { if (name == _name) targ = id; } if (!i_ex(targ)) { debug_message("target does not exist"); return false; } if (abs(targ.x - _xloc) < _tol && abs(targ.y - _yloc) < _tol) return true; }
("kris", 5.5, 4, 1))
18
{
19
    timer++;
20
    if (timer == 30)
21
    {
22
        timer = 0;
23
        kris.facing = 2;
24
        if (global.flag[1055 sword_route_progress] > 0)
25
            con = 10;
26
        else
27
            con = 20;
28
    }
29
}
30
if (con == 10)
31
{
32
    snd_play_x(snd_noise, 0.8, 0.5);
33
    snd_play_x(snd_noise, 0.8, 0.7);
34
    
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");
35
    msgsetloc(0, 
UNLOCKED WITH THE\nICE KEY
"UNLOCKED WITH THE\n\\cIICE KEY\\cW", "obj_board_b2s_icedoor_slash_Step_0_gml_37_0"
);
36
    d = bw_make();
37
    d.skippable = false;
38
    d.reachedend_draw_triangle = false;
39
    d.rate = 6;
40
    d.textsound = snd_silent;
41
    d.reachedend_sound_play = false;
42
    d.boardopensound = false;
43
    d.side = 1;
44
    global.interact = 1;
45
    con = 11;
46
    timer = 0;
47
}
48
if (con == 11)
49
{
50
    if (i_ex(d.writer))
51
    {
52
        if (d.writer.reachedend)
53
        {
54
            timer++;
55
            if (timer >= 30)
56
            {
57
                safe_delete(d);
58
                safe_delete(obj_writer);
59
                image_index = 1;
60
                snd_play_x(snd_impact, 0.8, 0.5);
61
                snd_play_x(snd_impact, 0.6, 0.8);
62
                timer = 0;
63
                con = 12;
64
            }
65
        }
66
    }
67
}
68
if (con == 12)
69
{
70
    timer++;
71
    if (timer == 1)
72
    {
73
        marker = 
scr_board_marker
scr_board_marker

function
scr_board_marker()
{ var _thismarker = instance_create(argument0, argument1, obj_board_marker); _thismarker.sprite_index = argument2; _thismarker.image_xscale = 2; _thismarker.image_yscale = 2; if (argument_count >= 4) _thismarker.image_speed = argument3; if (argument_count >= 5) { if (argument4 != -1) _thismarker.depth = argument4; } if (argument_count >= 6) _thismarker.image_xscale = argument5; if (argument_count >= 6) _thismarker.image_yscale = argument5; if (argument_count >= 7) _thismarker.animateonce = argument6; return _thismarker; }
(board_tilex(0), board_tiley(0), spr_pxwhite, 0, 900000, 640);
74
        marker.image_blend = c_black;
75
        marker.image_alpha = 0;
76
    }
77
    var count = 5;
78
    for (var i = 1; i < (count + 1); i++)
79
    {
80
        if (timer == (30 + (10 * i)))
81
        {
82
            obj_gameshow_swordroute.screencolor = merge_color(#5AAFFF, c_black, i / count);
83
            marker.image_alpha = i / count;
84
        }
85
    }
86
    if (timer == (30 + (10 * (count + 1))))
87
    {
88
        global.swordscreencolor = c_black;
89
        global.interact = 0;
90
        room_goto(room_board_dungeon_2);
91
    }
92
}
93
if (con == 20)
94
{
95
    timer++;
96
    if (timer == 15)
97
    {
98
        global.flag[1103 ice_key_fail] = 1;
99
        depth = 100000;
100
        drawblue = true;
101
        obj_gameshow_swordroute.drawui = false;
102
        obj_gameshow_swordroute.screencolor = #3F48CC;
103
        snd_play(snd_nes_nocontroller);
104
        drawtext = 1;
105
    }
106
    if (timer == 210)
107
    {
108
        con = 21;
109
        timer = 89;
110
    }
111
}
112
if (con == 21)
113
{
114
    timer++;
115
    if (timer == 90)
116
    {
117
        drawtext = false;
118
        drawblue = false;
119
        drawblack = true;
120
        snd_play(snd_noise);
121
        obj_board_controller.drawcrt = false;
122
        obj_gameshow_swordroute.screencolor = c_black;
123
        global.swordscreencolor = c_black;
124
        global.flag[1007 swordroute_evict] = 1;
125
    }
126
    if (timer == 99)
127
        global.facing = 0;
128
    if (timer == 100)
129
    {
130
        global.interact = 0;
131
        global.facing = 0;
132
        global.entrance = 2;
133
        room_goto(room_board_sword_intro);
134
    }
135
}