Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_ch2_keyboard_cutscene_controller_Create_0

(view raw script w/o annotations or w/e)
1
depth = 800000;
2
lost = 0;
3
won = 0;
4
con = 0;
5
timer = 0;
6
init = 0;
7
currentString = "";
8
noelleString = "";
9
idealString = stringsetloc(
DECEMBER
"DECEMBER", "obj_ch2_keyboard_cutscene_controller_slash_Create_0_gml_15_0"
);
10
addString = "";
11
letterCount = 0;
12
lastPressedTile = -100;
13
lastPressedTile = -100;
14
imageTimer = 0;
15
autoGenerate = (puzzle_id == 2) ? 1 : 0;
16
autoWidth = 8;
17
autoString = stringsetloc(
DECEMBER
"DECEMBER", "obj_ch2_keyboard_cutscene_controller_slash_Create_0_gml_25_0"
);
18
autoX = x;
19
autoY = y;
20
var len = string_length(autoString);
21
for (j = 0; j < 2; j++)
22
{
23
    for (i = 0; i < len; i++)
24
    {
25
        keytile[i] = instance_create(autoX + (i * 200) + ((1 - j) * 60), autoY + (j * 120), obj_ch2_keyboardpuzzle_tile);
26
        keytile[i].myString = string_char_at(autoString, i + 1);
27
        currentW++;
28
        if (currentW >= autoWidth)
29
        {
30
            currentW = 0;
31
            currentH++;
32
        }
33
    }
34
}