Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b2pantheonentrance_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 (active == 1)
4
{
5
    if (con == 0 && obj_board_camera.con == 0)
6
    {
7
        intimer++;
8
        if (intimer == 15)
9
        {
10
            tenna.bounce = true;
11
            var tetalk = stringsetloc(
Welcome to KODAKODA SHRINE!
"Welcome to KODAKODA SHRINE!", "obj_b2pantheonentrance_slash_Step_0_gml_19_0"
);
12
            
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);
13
        }
14
        if (kris.camera == true)
15
        {
16
            intimer = 0;
17
            with (obj_mainchara_board)
18
            {
19
                if (y < 80)
20
                    y = 80;
21
            }
22
            with (topexit1)
23
            {
24
                setxy(other.x + 128, other.y - 32);
25
                instance_create(x, y, obj_board_smokepuff);
26
            }
27
            with (topexit2)
28
            {
29
                setxy(other.x + 160, other.y - 32);
30
                instance_create(x, y, obj_board_smokepuff);
31
            }
32
            with (leftexit)
33
            {
34
                instance_create(x, y - 32, obj_board_smokepuff);
35
                setxy(room_width, room_height);
36
            }
37
            snd_play(snd_board_door_close);
38
            with (obj_board_smokepuff)
39
                depth = 900000;
40
            con++;
41
        }
42
    }
43
    if (con == 1 && obj_board_camera.con == 0)
44
    {
45
        var photocount = global.flag[1041 got_half_flower] + global.flag[1042 got_spring_photo] + global.flag[1043 got_cactus_photo] + global.flag[1227 got_antlion_photo];
46
        if (photocount >= 3)
47
            made = 1;
48
        if (!made)
49
        {
50
            made = 1;
51
            shopwriter = instance_create(x, y, obj_board_shopwriter);
52
            shopwriter.yloc = board_tiley(2);
53
            shopwriter.shopstring = stringsetloc(
TAKE 3 GRAND PHOTOS#TO REACH THE OCEAN.
"TAKE 3 GRAND PHOTOS#TO REACH THE OCEAN.", "obj_b2pantheonentrance_slash_Step_0_gml_48_0"
);
54
        }
55
        if (photocount >= 3)
56
        {
57
            con = 2;
58
            snd_play(snd_board_door_close);
59
            var tetalk = stringsetloc(
With 3 PHOTOS, a PATH OPENS...
"With 3 PHOTOS, a PATH OPENS...", "obj_b2pantheonentrance_slash_Step_0_gml_68_0"
);
60
            
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);
61
            raftwatch = 1;
62
            with (rightexit1)
63
            {
64
                instance_create(x, y, obj_board_smokepuff);
65
                setxy(room_width, room_height);
66
            }
67
            with (rightexit2)
68
            {
69
                instance_create(x, y, obj_board_smokepuff);
70
                setxy(room_width, room_height);
71
            }
72
            with (obj_board_smokepuff)
73
                depth = 900000;
74
        }
75
    }
76
    if (suwalk == 0 && obj_board_camera.con == 0)
77
    {
78
        suwalktimer++;
79
        if (suwalktimer == 1)
80
            ralsei.follow = true;
81
        if (suwalktimer == 15)
82
        {
83
            if (susie.y == 286)
84
                
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, 6, 0);
85
            if (susie.y == 80 || susie.y == 64)
86
                
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", 1, 5, 0);
87
            if (susie.x == 128)
88
                
scr_play_recording
scr_play_recording

function
scr_play_recording(arg0, arg1)
{ with (obj_mainchara_board) { if (name == arg0) { susierecordcon = 2; susierecordcount = 0; susierecordstring = arg1; susierecordsave = false; } } }
("susie", "0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0R0R0R0R0R0R0R0R0R0D0D0W0W");
89
            if (susie.x == 480)
90
                
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, 6, 0);
91
            suwalk = 1;
92
        }
93
    }
94
}
95
else
96
{
97
    if (made == true)
98
    {
99
        made = false;
100
        safe_delete(shopwriter);
101
    }
102
    suwalktimer = 0;
103
    suwalk = 0;
104
}
105
if (flagtoset != 0)
106
{
107
    with (obj_board_b2_photopodium)
108
    {
109
        if (num == 1 && myflag == 0)
110
        {
111
            myflag = other.flagtoset;
112
            other.flagtoset = 0;
113
        }
114
        if (num == 2 && myflag == 0)
115
        {
116
            myflag = other.flagtoset;
117
            other.flagtoset = 0;
118
        }
119
        if (num == 3 && myflag == 0)
120
        {
121
            myflag = other.flagtoset;
122
            other.flagtoset = 0;
123
        }
124
    }
125
    flagtoset = 0;
126
}
127
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
128
{
129
    if (keyboard_check_pressed(ord("1")) && keyboard_check(ord("W")))
130
    {
131
        global.flag[1041 got_half_flower] = 1;
132
        global.flag[1042 got_spring_photo] = 1;
133
        global.flag[1043 got_cactus_photo] = 1;
134
        global.flag[1227 got_antlion_photo] = 1;
135
    }
136
}
137
if (raftwatch == 1)
138
{
139
    if (obj_board_camera.shift != "none")
140
    {
141
        raftwatch = 2;
142
        if (obj_board_camera.shift == "right")
143
        {
144
        }
145
        else
146
        {
147
            obj_b2raftget.textpat = 1;
148
            var tetalk = stringsetloc(
Hey kids, wrong way!
"Hey kids, wrong way!", "obj_b2pantheonentrance_slash_Step_0_gml_129_0"
);
149
            if (obj_board_camera.shift == "warp")
150
                tetalk = stringsetloc(
Oh, go back! You missed the special prize!
"Oh, go back! You missed the special prize!", "obj_b2pantheonentrance_slash_Step_0_gml_132_0"
);
151
            tenna.bounce = 1;
152
            
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, 80);
153
        }
154
    }
155
}