Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_castlefront_event_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 1)
2
{
3
    global.facing = 2;
4
    s = 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; }
(340, 1000, spr_susieu_dark);
5
    r = 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; }
(260, 1008, spr_ralseiu);
6
    l = 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; }
(280, 740, spr_lancer_ut_unhappy);
7
    with (obj_marker)
8
        scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
9
    con = 2;
10
    global.interact = 1;
11
    alarm[4] = 30;
12
}
13
if (con == 2)
14
    global.interact = 1;
15
if (con == 3)
16
{
17
    global.fc = 1;
18
    global.fe = 9;
19
    global.typer = 30;
20
    global.msg[0] = 
* Lancer!Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_castlefront_event_slash_Step_0_gml_24_0")
;
21
    instance_create(0, 0, obj_dialoguer);
22
    con = 4;
23
}
24
if (con == 4 && !d_ex())
25
{
26
    with (l)
27
    {
28
        sprite_index = spr_lancer_dt_unhappy;
29
        vspeed = -3;
30
    }
31
    with (obj_mainchara)
32
    {
33
        fun = 1;
34
        vspeed = -8;
35
        image_speed = 0.25;
36
    }
37
    with (s)
38
    {
39
        vspeed = -8;
40
        image_speed = 0.25;
41
    }
42
    with (r)
43
    {
44
        vspeed = -8;
45
        image_speed = 0.25;
46
    }
47
    con = 5;
48
    alarm[4] = 48;
49
}
50
if (con == 6)
51
{
52
    snd_free_all();
53
    snd_play(snd_locker);
54
    instance_create(0, 0, obj_shake);
55
    door = 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; }
(226, 534, spr_cardcastlefrontdoor);
56
    door.depth = 1000000;
57
    with (l)
58
        instance_destroy();
59
    with (s)
60
        scr_halt
scr_halt

function scr_halt() { image_index = 0; image_speed = 0; speed = 0; }
();
61
    with (r)
62
        scr_halt
scr_halt

function scr_halt() { image_index = 0; image_speed = 0; speed = 0; }
();
63
    with (obj_mainchara)
64
        scr_halt
scr_halt

function scr_halt() { image_index = 0; image_speed = 0; speed = 0; }
();
65
    con = 7;
66
    alarm[4] = 40;
67
}
68
if (con == 8)
69
{
70
    global.msg[0] = 
* Hey,Delay 11 what are you doing...!?Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_castlefront_event_slash_Step_0_gml_58_0")
;
71
    instance_create(0, 0, obj_dialoguer);
72
    con = 15;
73
}
74
if (con == 15 && !d_ex())
75
{
76
    with (s)
77
        sprite_index = spr_susier_dark_unhappy;
78
    with (r)
79
        sprite_index = spr_ralseil;
80
    global.facing = 0;
81
    with (obj_mainchara)
82
        sprite_index = spr_krisd_dark;
83
    exc = instance_create(obj_mainchara.x + 20, obj_mainchara.y - 20, obj_excblcon);
84
    con = 16;
85
    alarm[4] = 20;
86
    for (i = 0; i < 4; i += 1)
87
    {
88
        spademanl[i] = 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 - (10 * i), 680 + (30 * i), spr_diamond_knight_overworld);
89
        with (spademanl[i])
90
        {
91
            image_xscale = -2;
92
            hspeed = 12;
93
            scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
94
        }
95
    }
96
    for (i = 0; i < 4; i += 1)
97
    {
98
        spademanr[i] = 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; }
(640 + (10 * i), 680 + (30 * i), spr_diamond_knight_overworld);
99
        with (spademanr[i])
100
        {
101
            image_xscale = 2;
102
            hspeed = -12;
103
            scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
104
        }
105
    }
106
    spademand[0] = 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; }
(320, 1100, spr_diamond_knight_overworld);
107
    with (spademand[0])
108
    {
109
        image_xscale = -2;
110
        vspeed = -12;
111
        scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
112
    }
113
    spademand[1] = 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; }
(320, 1100, spr_diamond_knight_overworld);
114
    with (spademand[1])
115
    {
116
        image_xscale = 2;
117
        vspeed = -12;
118
        scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
119
    }
120
}
121
if (con == 17)
122
{
123
    with (exc)
124
        instance_destroy();
125
    with (obj_marker)
126
        scr_halt
scr_halt

function scr_halt() { image_index = 0; image_speed = 0; speed = 0; }
();
127
    con = 18;
128
    alarm[4] = 20;
129
}
130
if (con == 19)
131
{
132
    global.typer = 6;
133
    global.fc = 0;
134
    global.msg[0] = 
* We've cornered them!Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_castlefront_event_slash_Step_0_gml_106_0")
;
135
    instance_create(0, 0, obj_dialoguer);
136
    con = 20;
137
    ftimer = 0;
138
    dcount = 0;
139
    so = 0;
140
    maxd = 36;
141
}
142
if (con == 20 && !d_ex())
143
{
144
    if (dcount < maxd)
145
    {
146
        if (so == 0)
147
        {
148
            snd_play(snd_noise);
149
            so = 1;
150
        }
151
        else
152
        {
153
            so = 0;
154
        }
155
        radius = 140;
156
        angle = (dcount / maxd) * 360;
157
        xpoint = obj_mainchara.x + 20;
158
        ypoint = obj_mainchara.y;
159
        xd = lengthdir_x(radius, angle);
160
        yd = lengthdir_y(radius, angle);
161
        db[dcount] = 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; }
(xpoint + xd, ypoint + yd, spr_diamondbullet);
162
        db[dcount].image_angle = angle;
163
        with (db[dcount])
164
        {
165
            image_xscale = 1;
166
            image_yscale = 1;
167
            image_alpha = 0;
168
            direction = image_angle;
169
            speed = 2;
170
            depth = 10000;
171
            friction = 0.1;
172
        }
173
        dcount += 1;
174
    }
175
    for (i = 0; i < dcount; i += 1)
176
    {
177
        with (db[i])
178
            image_alpha += 0.1;
179
    }
180
    if (dcount >= maxd)
181
    {
182
        ftimer += 1;
183
        if (ftimer >= 20)
184
            con = 21;
185
    }
186
}
187
if (con == 21)
188
{
189
    global.typer = 31;
190
    global.fc = 2;
191
    global.fe = 3;
192
    global.msg[0] = 
* W...Delay 11 Wait...!Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_castlefront_event_slash_Step_0_gml_163_0")
;
193
    instance_create(0, 0, obj_dialoguer);
194
    con = 22;
195
}
196
if (con == 22 && !d_ex())
197
{
198
    for (i = 0; i < dcount; i += 1)
199
    {
200
        with (db[i])
201
        {
202
            gravity = 1;
203
            gravity_direction = image_angle + 180;
204
        }
205
    }
206
    con = 26;
207
}
208
if (con == 26)
209
{
210
    if (db[0].x <= (obj_mainchara.x + 90))
211
    {
212
        snd_free_all();
213
        snd_play(snd_hurt1);
214
        con = 27;
215
        black = 1;
216
        alarm[4] = 120;
217
    }
218
}
219
if (con == 28)
220
{
221
    global.entrance = 0;
222
    global.interact = 3;
223
    room_goto(room_cc_prison_cells);
224
}