Deltarune script viewer

← back to main script listing

gml_Object_obj_musicguys_thingy_Create_0

(view raw script w/o annotations or w/e)
1
timer = 0;
2
mode = 4;
3
count = 0;
4
input_memorizer = 0;
5
file = file_text_open_read("bulletpattern.txt");
6
n = 0;
7
finished = 0;
8
while (finished == 0)
9
{
10
    linestring = file_text_read_string(file);
11
    if (linestring == "x")
12
        break;
13
    found = 0;
14
    j = 1;
15
    b = 0;
16
    mystring[0] = "";
17
    mystring[1] = "";
18
    mystring[2] = "";
19
    while (found == 0)
20
    {
21
        foundchar = string_char_at(linestring, j);
22
        if (foundchar != " " && foundchar != ",")
23
            mystring[b] += foundchar;
24
        if (foundchar == ",")
25
            b++;
26
        j++;
27
        if (foundchar == "")
28
            found = 1;
29
    }
30
    bullet_frame[n] = real(mystring[0]) - 150;
31
    bullet_pos[n] = real(mystring[1]);
32
    bullet_height[n] = real(mystring[2]);
33
    file_text_readln(file);
34
    n++;
35
    if (n >= 2000)
36
        finished = 1;
37
}
38
file_text_close(file);
39
remframe = bullet_frame[0];
40
bulletcount = 0;
41
bulletmax = n - 1;
42
mframecount = 0;