Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_GSA02_B0_Step_0

(view raw script w/o annotations or w/e)
1
if (!button3_h())
2
    chold = 0;
3
else
4
    chold++;
5
buffer--;
6
if (con < 4 && (button1_p() || chold > 3) && buffer <= 0)
7
{
8
    safe_delete(sword);
9
    safe_delete(consolestarter);
10
    with (obj_board_marker)
11
    {
12
        if (sprite_index == spr_5x5shine)
13
            instance_destroy();
14
    }
15
    snd_play(snd_board_bomb);
16
    con = 4;
17
    safe_delete(blackout);
18
    drawscreen = true;
19
    depth = 998390;
20
    for (var i = 0; i < array_length(border); i++)
21
    {
22
        with (border[i])
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.5, 0, 30, 1, "out");
24
    }
25
    snd_stop(snd_nes_intro_extended);
26
    snd_stop(snd_tv_poweron2);
27
    timer = 0;
28
}
29
if (con == 0)
30
{
31
    timer++;
32
    if (timer == 15)
33
    {
34
        consolestarter = instance_create(0, 0, obj_swordroute_consolestarter);
35
        with (consolestarter)
36
        {
37
            timer = 0;
38
            standalone = 2;
39
            con = 10;
40
        }
41
        timer = 0;
42
        con = -1;
43
    }
44
}
45
if (con == 2)
46
{
47
    timer++;
48
    if ((timer % 30) == 0 && timer < 194)
49
    {
50
        consolestarter.drawboxcolor = true;
51
        consolestarter.drawcolor = merge_color(c_black, #3F48CC, clamp(timer / 180, 0, 1));
52
        consolestarter.logocolor = merge_color(c_black, #252C8C, clamp(timer / 180, 0, 1));
53
    }
54
    if (timer == 155)
55
    {
56
        sword = 
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; }
(270, -256, spr_board_game_title_sword);
57
        sword.image_blend = obj_swordroute_consolestarter.logocolor;
58
        sword.depth = obj_swordroute_consolestarter.depth - 1;
59
        sword.vspeed = 6;
60
        scr_limitval_upper(sword, "y", 64);
61
    }
62
    if (i_ex(sword))
63
    {
64
        sword.image_blend = obj_swordroute_consolestarter.logocolor;
65
        if (sword.y >= 60)
66
        {
67
            timer = 0;
68
            safe_delete(sword);
69
            safe_delete(consolestarter);
70
            with (obj_board_marker)
71
            {
72
                if (sprite_index == spr_5x5shine)
73
                    instance_destroy();
74
            }
75
            snd_play(snd_board_bomb);
76
            con = 4;
77
            safe_delete(blackout);
78
            drawscreen = true;
79
            depth = 998390;
80
            for (var i = 0; i < array_length(border); i++)
81
            {
82
                with (border[i])
83
                    
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.5, 0, 90, 1, "out");
84
            }
85
        }
86
    }
87
}
88
if (con == 4)
89
{
90
    timer++;
91
    if (timer == 1)
92
    {
93
        flash = 
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, depth - 1, 384);
94
        flash.image_alpha = 1.8;
95
        mus = snd_loop(snd_nes_intro_extended_part2);
96
        snd_volume(mus, 0.7, 0);
97
    }
98
    if ((timer % 5) == 0)
99
    {
100
        with (flash)
101
            image_alpha -= 0.25;
102
    }
103
    if (i_ex(flash))
104
    {
105
        if (flash.image_alpha <= 0)
106
        {
107
            timer = 0;
108
            con = 5;
109
        }
110
    }
111
}
112
if (con == 5)
113
{
114
    timer++;
115
    if (timer == 10)
116
    {
117
        var tetalk = stringsetloc(
Welcome to the WORLD of TV TIME!!
"Welcome to the WORLD of TV TIME!!", "obj_GSA02_B0_slash_Step_0_gml_130_0"
);
118
        with (
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(tetalk, "tenna", 2, 70))
119
            depth = -10;
120
        with (obj_actor_tenna)
121
            bounce = 1;
122
    }
123
    if (timer == 80)
124
    {
125
        var tetalk = stringsetloc(
Don't be blown away by the graphics, kids!
"Don't be blown away by the graphics, kids!", "obj_GSA02_B0_slash_Step_0_gml_137_0"
);
126
        
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(tetalk, "tenna", 2, 70);
127
        with (obj_actor_tenna)
128
            bounce = 1;
129
    }
130
    if (timer == 150)
131
    {
132
        var sutalk = stringsetloc(
Uh... I'll try not to.
"Uh... I'll try not to.", "obj_GSA02_B0_slash_Step_0_gml_144_0"
);
133
        
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(sutalk, "susie", 2, 70);
134
        with (obj_caterpillarchara)
135
        {
136
            if (name == "susie")
137
                sprite_index = spr_susie_walk_right_dw_unhappy;
138
        }
139
    }
140
    if (timer == 220)
141
    {
142
        with (obj_caterpillarchara)
143
        {
144
            if (name == "susie")
145
                sprite_index = spr_susie_walk_up_dw;
146
        }
147
    }
148
    if (timer == 280)
149
    {
150
        var tetalk = stringsetloc(
Kris! Only YOU may press any button to start!
"Kris! Only YOU may press any button to start!", "obj_GSA02_B0_slash_Step_0_gml_181_0"
);
151
        
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(tetalk, "tenna", 2, 90);
152
        with (obj_actor_tenna)
153
            bounce = 1;
154
    }
155
    if (timer == 400)
156
    {
157
        var tetalk = stringsetloc(
At any time, you may press ONE button!
"At any time, you may press ONE button!", "obj_GSA02_B0_slash_Step_0_gml_187_0"
);
158
        
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(tetalk, "tenna", 2, 90);
159
        with (obj_actor_tenna)
160
            bounce = 1;
161
    }
162
    var contcon = 0;
163
    if (timer == 580)
164
    {
165
        var tetalk = stringsetloc(
... you know what, forget it.
"... you know what, forget it.", "obj_GSA02_B0_slash_Step_0_gml_196_0"
);
166
        
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(tetalk, "tenna", 2, 90);
167
        with (obj_actor_tenna)
168
            bounce = 1;
169
        nopress = 1;
170
    }
171
    if (timer == 610)
172
        contcon = 1;
173
    if (button1_p() || button2_p() || (button3_p() && nopress == 0))
174
        contcon = 1;
175
    if (contcon == 1)
176
    {
177
        snd_play(snd_board_text_main_end);
178
        snd_play(snd_explosion_mmx3);
179
        snd_volume(mus, 0, 30);
180
        nopress = 1;
181
        timer = 0;
182
        con++;
183
    }
184
}
185
if (con == 6)
186
{
187
    timer++;
188
    if (timer == 30)
189
    {
190
        snd_stop(mus);
191
        room_goto(room_board_intro);
192
    }
193
}