Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_takingtoolong_Draw_0

(view raw script w/o annotations or w/e)
1
var jp = variable_global_exists("lang") && global.lang == "ja";
2
if (pause != 1)
3
    timer += text_speed;
4
if (polite && timer < 30)
5
    timer += 0.3;
6
if (timer > (76 + (60 * (polite == 2))))
7
    instance_destroy();
8
if (!bright && !instance_exists(obj_ghosthouse_jackolantern) && !instance_exists(obj_dw_church_jackenstein))
9
    exit;
10
var str;
11
if ((i_ex(obj_jackenstein_enemy) && obj_jackenstein_enemy.scaredycat) && pause > 1 && tutu < 2)
12
    str = stringsetloc(
LONG
"LONG", "obj_takingtoolong_slash_Draw_0_gml_19_0"
);
13
else if (!small || pause > 1)
14
    str = stringsetloc(
YOUR
"YOUR", "obj_takingtoolong_slash_Draw_0_gml_21_0"
);
15
else
16
    str = " ";
17
var str2 = stringsetloc(
YOUR
"YOUR ", "obj_takingtoolong_slash_Draw_0_gml_25_0"
);
18
if (small && timer == (11 - max(ceil(obj_ghosthouse_jackolantern.timer / 11), 10 * (i_ex(obj_jackenstein_enemy) && obj_jackenstein_enemy.scaredycat))) && pause < 1)
19
{
20
    if (instance_number(object_index) < 27)
21
    {
22
        if ((instance_number(object_index) % 2) == 0)
23
            doom = true;
24
        var _x = lengthdir_x(9 + (2.4 * instance_number(object_index)) + random(9), (instance_number(object_index) + 74) * instance_number(object_index));
25
        var _y = lengthdir_y(7 + (1.7 * instance_number(object_index)), ((3.12 * instance_number(object_index)) + 74) * instance_number(object_index)) - 15;
26
        with (instance_create_depth(obj_ghosthouse_jackolantern.x + _x, obj_ghosthouse_jackolantern.y + _y, obj_heart.depth - instance_number(object_index), obj_bulletparent))
27
        {
28
            sprite_index = spr_small_jackolantern;
29
            snd_play(snd_small_jackolantern_appear);
30
            with (instance_create_depth(x - 40, y - 40, obj_heart.depth - 1000, obj_takingtoolong))
31
                small = true;
32
        }
33
    }
34
}
35
if (small && timer == 12 && pause == 0)
36
{
37
    pause = true;
38
    timer = 0;
39
}
40
if (small && obj_ghosthouse_jackolantern.timer >= 130 && pause == 1)
41
{
42
    pause = 2;
43
    timer = 0;
44
    fade = 1;
45
    if (i_ex(obj_jackenstein_enemy) && obj_jackenstein_enemy.scaredycat)
46
        text_speed = 4;
47
}
48
if (jp && tutu == 1)
49
{
50
    str = "カ";
51
    if (timer > 9)
52
        str += " ワ";
53
    if (timer > 19)
54
        str += " イ";
55
    if (timer > 29)
56
        str += " す";
57
    if (timer > 39)
58
        str += "ぎ";
59
}
60
else if (jp && tutu == 2)
61
{
62
    text_speed = 2;
63
    str = "す";
64
    if (timer > 15)
65
        str += "き";
66
    if (timer > 30)
67
        str += "    す";
68
    if (timer > 45)
69
        str += "き";
70
}
71
else if (jp && !bright && !tutu && (!small || (pause > 1 && timer > 0)))
72
{
73
    str = "ナ";
74
    str2 = str;
75
    if (timer > 12)
76
        str += "ガ";
77
    if (timer > 20)
78
        str += "イ";
79
    if (timer > 32)
80
        str += " シ";
81
    if (timer > 39)
82
        str += "す";
83
    if (timer > 46)
84
        str += "ぎ";
85
}
86
else if (jp && bright)
87
{
88
    str = "マ";
89
    if (timer > 10)
90
        str += " ブ";
91
    if (timer > 20)
92
        str += " シ";
93
    if (timer > 30)
94
        str += " イ";
95
    if (timer > 38)
96
        str += " す";
97
    if (timer > 46)
98
        str += "ぎ";
99
}
100
else
101
{
102
    if (timer > (12 + (bright ? 10 : 0)))
103
    {
104
        if (bright)
105
            str += stringsetloc(
TOO
" TOO", "obj_takingtoolong_slash_Draw_0_gml_69_0"
);
106
        else if (tutu < 2)
107
            str += stringsetloc(
TAKING
" TAKING", "obj_takingtoolong_slash_Draw_0_gml_71_0"
);
108
        else
109
            str += stringsetloc(
" ", "obj_takingtoolong_slash_Draw_0_gml_73_0"
);
110
    }
111
    if (timer > (26 + (bright ? 13 : 0)))
112
    {
113
        if (bright)
114
            str += stringsetloc(
BRIGHT
" BRIGHT", "obj_takingtoolong_slash_Draw_0_gml_78_0"
);
115
        else
116
            str += stringsetloc(
TOO
" TOO", "obj_takingtoolong_slash_Draw_0_gml_80_0"
);
117
    }
118
    if (timer > (36 + (5 * jp)) && !bright)
119
    {
120
        if (tutu)
121
            str += stringsetloc(
TOO
" TOO", "obj_takingtoolong_slash_Draw_0_gml_85_0"
);
122
        else
123
            str += stringsetloc(
LONG
" LONG", "obj_takingtoolong_slash_Draw_0_gml_87_0"
);
124
    }
125
}
126
if (polite == 2)
127
{
128
    if (timer > 61)
129
    {
130
        if (jp)
131
            str2 += "ガ";
132
        else
133
            str2 += stringsetloc(
TAKING
"TAKING", "obj_takingtoolong_slash_Draw_0_gml_93_0"
);
134
    }
135
    if (timer > 68 && jp)
136
        str2 += "イ";
137
    if (timer > 80)
138
    {
139
        if (jp)
140
            str2 += " シ";
141
        else
142
            str2 += stringsetloc(
TOO
" TOO", "obj_takingtoolong_slash_Draw_0_gml_97_0"
);
143
    }
144
    if (timer > 87)
145
    {
146
        if (jp)
147
            str2 += "す";
148
        else
149
            str2 += stringsetloc(
LONG
" LONG", "obj_takingtoolong_slash_Draw_0_gml_101_0"
);
150
    }
151
    if (timer > 94)
152
        str2 += "ぎ";
153
}
154
if (doom && pause == 2)
155
    instance_destroy();
156
draw_set_alpha(1);
157
draw_set_color(c_white);
158
if (jp)
159
{
160
    if (small)
161
        draw_set_font(fnt_ja_main);
162
    else
163
        draw_set_font(fnt_ja_mainbig);
164
}
165
else if (small)
166
{
167
    draw_set_font(fnt_main);
168
}
169
else
170
{
171
    draw_set_font(fnt_mainbig);
172
}
173
var num = (!polite * max(0, (string_length(str) / (6 - (3.5 * jp))) - 1)) / (1 + small);
174
draw_set_alpha(fade);
175
for (var pos = 1; pos <= string_length(str); pos++)
176
    draw_text(x + irandom_range(-num, num) + ((15 - (8 * small)) * pos * (1 + jp)), y + irandom_range(-num, num), string_char_at(str, pos));
177
if (polite == 2 && timer > 49)
178
    draw_text((x + 152) - (32 * jp), y + 30, jp ? "ニ" : stringsetloc(
IS
"IS", "obj_takingtoolong_slash_Draw_0_gml_126_0"
));
179
if (polite == 2 && timer > 53)
180
{
181
    var pos = 1 + (4 * !jp);
182
    while (pos <= string_length(str2))
183
    {
184
        draw_text(x + (15 * pos * (1 + jp)), y + 60, string_char_at(str2, pos));
185
        pos++;
186
    }
187
}
188
draw_set_alpha(1);