Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b2bombfun2_Step_0

(view raw script w/o annotations or w/e)
1
scr_board_populatevars
scr_board_populatevars

function
scr_board_populatevars()
{ if (!variable_instance_exists(id, "kris")) kris = 0; if (!variable_instance_exists(id, "susie")) susie = 0; if (!variable_instance_exists(id, "ralsei")) ralsei = 0; if (kris == 0) { with (obj_mainchara_board) { if (name == "kris") other.kris = id; } } if (ralsei == 0) { with (obj_mainchara_board) { if (name == "ralsei") other.ralsei = id; } } if (susie == 0) { with (obj_mainchara_board) { if (name == "susie") other.susie = id; } } }
();
2
scr_gameshow_populatevars
scr_gameshow_populatevars

function
scr_gameshow_populatevars()
{ if (!variable_instance_exists(id, "kr_real")) kr_real = 0; if (!variable_instance_exists(id, "su_real")) su_real = 0; if (!variable_instance_exists(id, "ra_real")) ra_real = 0; if (!variable_instance_exists(id, "tenna")) tenna = 0; if (kr_real == 0) { with (obj_mainchara) other.kr_real = id; } if (su_real == 0) { with (obj_caterpillarchara) { if (name == "susie") other.su_real = id; } } if (ra_real == 0) { with (obj_caterpillarchara) { if (name == "ralsei") other.ra_real = id; } } if (tenna == 0) { with (obj_actor_tenna) other.tenna = id; } }
();
3
if (mossblock == 0)
4
{
5
    with (obj_board_npc)
6
    {
7
        if (extflag == "b2bombfun2")
8
            other.mossblock = id;
9
    }
10
}
11
if (bombfun1visited == 1)
12
{
13
    safe_delete(blocker);
14
    mossblock.y -= 32;
15
    bombfun1visited = 2;
16
}
17
if (active == 1)
18
{
19
    if (bombfun1visited == 0)
20
    {
21
        with (obj_board_trigger)
22
        {
23
            if (extflag == "bombhint")
24
            {
25
                if (place_meeting(x, y, obj_mainchara_board))
26
                {
27
                    other.bombfun1visited = 0.1;
28
                    other.timer2 = 0;
29
                }
30
            }
31
        }
32
    }
33
    if (bombfun1visited == 0.1)
34
    {
35
        var tetalk = stringsetloc(
A cracked wall! What could it mean!?
"A cracked wall! What could it mean!?", "obj_b2bombfun2_slash_Step_0_gml_36_0"
);
36
        
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, 60);
37
        bombfun1visited = 0.5;
38
    }
39
    if (mosscon == 1)
40
    {
41
        if (i_ex(obj_board_writer))
42
        {
43
            if (i_ex(obj_writer))
44
            {
45
                if (obj_writer.msgno == 1)
46
                {
47
                    if (obj_writer.halt)
48
                        mosscon = 2;
49
                }
50
            }
51
        }
52
    }
53
    if (mosscon == 2)
54
    {
55
        mosstimer++;
56
        if (mosstimer == 1)
57
        {
58
            mossblock.x = room_width * 999;
59
            global.flag[1078 got_ch3_moss] = 1;
60
            kris.myhealth = kris.maxhealth;
61
            snd_play(snd_power);
62
            with (obj_event_manager)
63
                trigger_event(UnknownEnum.Value_0, UnknownEnum.Value_11);
64
        }
65
        if (mosstimer == 25)
66
        {
67
            var talk = stringsetloc(
That's what#it means.
"That's what#it means.", "obj_b2bombfun2_slash_Step_0_gml_63_0"
);
68
            if (bombfun1visited == 0.5)
69
                
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; }
(talk, "ralsei", 2, 90);
70
            else
71
                talk = stringsetloc(
Damn. Good catch. THAT'S why Kris should be playing.
"Damn. Good catch. THAT'S why Kris should be playing.", "obj_b2bombfun2_slash_Step_0_gml_70_0"
);
72
            
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; }
(talk, "susie", 2, 90);
73
            mosscon++;
74
        }
75
    }
76
    if (con == 0 && obj_board_camera.con == 0)
77
    {
78
        var boardkris = -4;
79
        with (obj_mainchara_board)
80
        {
81
            if (name == "kris")
82
                boardkris = id;
83
        }
84
        var trig = false;
85
        with (obj_board_trigger)
86
        {
87
            if (extflag == "tennaback" && boardkris != -4)
88
            {
89
                if (place_meeting(x, y, boardkris))
90
                {
91
                    trig = true;
92
                    instance_destroy();
93
                }
94
            }
95
        }
96
        if (trig == true)
97
        {
98
            con = 1;
99
            timer = 0;
100
        }
101
    }
102
    if (con == 1 && bombfun1visited == 2)
103
    {
104
        timer++;
105
        if (timer == 1)
106
        {
107
            with (tenna)
108
                
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", camerax() + 784, 484, 15, -1, "out");
109
            snd_play(snd_slidewhistle);
110
            global.flag[1022 tenna_board_absent] = 0;
111
            global.flag[1024 board_transitioning?] = 1;
112
        }
113
        if (timer == 16)
114
        {
115
            tenna.bounce = true;
116
            var tetalk = stringsetloc(
I'm back! I apologize to the viewers!!!
"I'm back! I apologize to the viewers!!!", "obj_b2bombfun2_slash_Step_0_gml_113_0"
);
117
            
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);
118
            global.flag[1024 board_transitioning?] = 0;
119
            timer = 0;
120
            con++;
121
        }
122
    }
123
    if (suwalk == 0 && obj_board_camera.con == 0)
124
    {
125
        suwalktimer++;
126
        if (suwalktimer == 1)
127
            ralsei.follow = true;
128
        if (suwalktimer == 15)
129
        {
130
            susie.sleepy = true;
131
            if (susie.x == 416)
132
            {
133
                if (i_ex(obj_quizchaser))
134
                    
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; } } } }
("susie", 7, 1, 0);
135
                else
136
                    
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; } } } }
("susie", 3, 2, 0);
137
            }
138
            else if (i_ex(obj_quizchaser))
139
            {
140
                
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; } } } }
("susie", 8, 6, 0);
141
            }
142
            else
143
            {
144
                
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; } } } }
("susie", 3, 3, 0);
145
            }
146
            suwalk = 1;
147
        }
148
    }
149
}
150
else
151
{
152
    suwalk = 0;
153
    suwalktimer = 0;
154
}
155
156
enum UnknownEnum
157
{
158
    Value_0,
159
    Value_11 = 11
160
}