Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_gameshow_swordroute_Create_0

(view raw script w/o annotations or w/e)
1
setxy(0, 0);
2
if (room == room_board_sword_intro)
3
{
4
    if (global.flag[1055 sword_route_progress] >= 6 && global.flag[1278 swordroute_soda] == 1)
5
    {
6
        soda = instance_create(436, 354, obj_swordroute_event_susiesoda);
7
        soda.depth = 99990;
8
        soda.image_blend = merge_color(c_white, c_black, 0.5);
9
    }
10
}
11
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
12
    
scr_setparty
scr_setparty

function
scr_setparty(arg0, arg1, arg2)
{ var kris = obj_mainchara; var slot = 0; var __make = true; if (!i_ex(kris)) __make = false;
scr_losechar();
safe_delete(obj_caterpillarchara); if (arg0 == true) {
scr_getchar(2);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 2, slot))
{ halign = (global.darkzone == 0) ? 3 : 6; valign = (global.darkzone == 0) ? 6 : 16; x -= halign; y -= valign; } } slot++; } if (arg1 == true) {
scr_getchar(3);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 3, slot))
{ halign = 2; valign = 12; x -= halign; y -= valign; } } slot++; } if (arg2 == true) {
scr_getchar(4);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 4, slot))
{ halign = (global.darkzone == 0) ? 2 : 4; valign = (global.darkzone == 0) ? 9 : 18; x -= halign; y -= valign; } } slot++; } }
(0, 0, 0);
13
kris = 1185;
14
kris.freeze = true;
15
kris.fun = true;
16
kris.sprite_index = spr_krisu_holdcontroller;
17
highlight = instance_create(x, y, obj_sprhighlight);
18
highlight.target = 1185;
19
highlight.match_depth = false;
20
highlight.depth = 0;
21
highlight.mustbevisible = false;
22
highlight.outline_only = true;
23
if (room != room_board_sword_intro)
24
{
25
    with (kris)
26
        setxy(300, 298);
27
    global.facing = 2;
28
}
29
with (kris)
30
    visible = false;
31
with (obj_mainchara)
32
    var cutscene = 1;
33
depth = 99980;
34
gameconsole = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(202, 322, spr_gameshow_console);
35
gameconsole.depth = 99985;
36
gameconsole.image_blend = merge_color(c_black, c_white, 0.5);
37
couch = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(0, 452, spr_gameshow_couch);
38
couch.depth = 950000;
39
couch.visible = false;
40
bg = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(0, 0, spr_gameshow_swordroutebg);
41
bg.depth = 99994;
42
lilkris = 0;
43
if (!variable_global_exists("swordscreencolor"))
44
    global.swordscreencolor = c_black;
45
screenalpha = 0.5;
46
colorchange = 0;
47
colorchangetime = 5;
48
screencolor = global.swordscreencolor;
49
newcolor = global.swordscreencolor;
50
krishadow = 1;
51
shadowfade = 0;
52
skip = false;
53
skiponce = false;
54
nochange = 0;
55
drawshadow = true;
56
disableshadow = false;
57
god = false;
58
drawui = true;
59
depth = 5000;
60
var playable = true;
61
if (room == room_board_sword_intro)
62
{
63
    if (global.plot < 121)
64
        global.plot = 121;
65
    drawui = false;
66
    obj_board_controller.drawcrt = false;
67
    global.swordscreencolor = c_black;
68
    newcolor = 0;
69
    screencolor = c_black;
70
    skip = true;
71
    kris.fun = false;
72
    kris.freeze = false;
73
    if (global.plot >= 121 && global.plot <= 129 && global.flag[1055 sword_route_progress] == 1)
74
        playable = false;
75
    if (global.plot >= 160 && global.plot < 180 && global.flag[1055 sword_route_progress] == 3)
76
        playable = false;
77
    if (global.plot >= 180 && global.flag[1055 sword_route_progress] > 2 && global.flag[1055 sword_route_progress] < 6)
78
        playable = true;
79
    if (global.flag[1055 sword_route_progress] >= 6)
80
        playable = false;
81
    if (playable)
82
    {
83
        var cutscene = instance_create(282, 322, obj_swordroute_consolestarter);
84
    }
85
    else
86
    {
87
        with (instance_create(0, 0, obj_board_solid))
88
        {
89
            image_xscale = 100;
90
            image_yscale = 100;
91
        }
92
        with (obj_mainchara_board)
93
        {
94
            controlled = 0;
95
            visible = false;
96
        }
97
    }
98
}
99
if (room == room_board_1_sword_trees || room == room_board_dungeon_2 || room == room_board_sword_intro)
100
{
101
    var sol = instance_create(0, 376, obj_solidblocksized);
102
    sol.image_xscale = 50;
103
    sol = instance_create(0, 308, obj_solidblocksized);
104
    sol.image_xscale = 50;
105
    sol = instance_create(-34, 348, obj_solidblocksized);
106
    var door = instance_create(620, 320, obj_doorAny);
107
    door.doorEntrance = "A";
108
    door.doorFadeMusic = 1;
109
    door.doorRoom = room_dw_console_room;
110
}
111
global.flag[7 disable_menu?] = 1;
112
if (room == room_board_2_sword)
113
{
114
    drawui = true;
115
    colorchange = true;
116
    screencolor = c_black;
117
    newcolor = screencolor;
118
    global.swordscreencolor = screencolor;
119
    skip = true;
120
}
121
if (room == room_board_3_sword || room == room_board_dungeon_3)
122
{
123
    drawui = true;
124
    colorchange = true;
125
    screencolor = c_black;
126
    global.swordscreencolor = screencolor;
127
    skip = true;
128
}
129
if (room == room_board_preshadowmantle || room == room_board_preshadowmantle_repeat)
130
{
131
    drawui = true;
132
    if (global.plot < 180)
133
        global.plot = 180;
134
    colorchange = true;
135
    newcolor = screencolor;
136
    global.swordscreencolor = screencolor;
137
    colorchange = 5;
138
    skip = true;
139
    if (room == room_board_preshadowmantle)
140
        drawui = true;
141
}
142
if (room == room_board_prepostshadowmantle)
143
{
144
    colorchange = true;
145
    screencolor = #0033FF;
146
    newcolor = screencolor;
147
    global.swordscreencolor = screencolor;
148
    skip = true;
149
    drawui = true;
150
}
151
if (room == room_board_preshadowmantle || room == room_board_preshadowmantle_repeat || room == room_shadowmantle || room == room_board_postshadowmantle || room == room_board_prepostshadowmantle || room == room_board_1_sword_trees)
152
{
153
    with (obj_mainchara_board)
154
    {
155
        xp = 0;
156
        swordlv = 5;
157
        xptolevel = 68;
158
        sword = true;
159
    }
160
}
161
if (room == room_board_dungeon_2)
162
{
163
    if (global.plot < 160)
164
        global.plot = 160;
165
    with (obj_mainchara_board)
166
    {
167
        facing = 2;
168
        swordlv = 2;
169
        xp = 0;
170
    }
171
}
172
debugdraw = 0;
173
if (room == room_board_1_sword || room == room_board_1_sword_trees || room == room_board_2_sword || room == room_board_dungeon_2 || room == room_board_dungeon_3)
174
{
175
    global.flag[6 disable_text_skip] = 0;
176
    global.flag[7 disable_menu?] = 1;
177
}
178
if (room == room_board_1_sword || room == room_board_dungeon_2 || room == room_board_dungeon_3)
179
{
180
    screencolor = c_black;
181
    newcolor = 0;
182
    screencolor = c_black;
183
    colorchange = -1;
184
}
185
if (room == room_board_1_sword_trees)
186
    screencolor = #FFF800;
187
killcount = 0;
188
siner = 0;
189
if (!playable)
190
{
191
    global.flag[7 disable_menu?] = 0;
192
    with (obj_gameshow_swordroute)
193
    {
194
        depth = 999980;
195
        bg.depth = 999994;
196
        gameconsole.depth = 999985;
197
    }
198
    with (obj_mainchara_board)
199
        ignoredepth = 1;
200
    with (obj_board_controller)
201
        depth = 999980;
202
    with (obj_marker)
203
    {
204
        if (x == 0 && y == 380)
205
            depth = 999979;
206
    }
207
    with (obj_mainchara)
208
    {
209
        ignoredepth = 1;
210
        depth = 999979;
211
    }
212
}