Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_ch3_ballcon_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 0 && appearcon == 1)
2
{
3
    for (i = 0; i < 30; i += 1)
4
        global.msg[i] = mytext[i];
5
    charxoff = 0;
6
    if (char > 0)
7
        charxoff = 40;
8
    global.typer = 50;
9
    if (typeroverride > 0)
10
        global.typer = typeroverride;
11
    writer = instance_create(x + 35 + charxoff, y + 20, obj_writer);
12
    writer.depth = depth - 1;
13
    mytext_sizecheck = string_replace_all(mytext[0], "&", "#");
14
    width = (32 + string_width(string_hash_to_newline(mytext_sizecheck)) + charxoff + 35) * 2;
15
    height = 32 + string_height(string_hash_to_newline(mytext_sizecheck)) + 20;
16
    con = 1;
17
}
18
if (con == 1)
19
{
20
    if (destroytime > 0)
21
    {
22
        timer++;
23
        if (timer >= destroytime)
24
        {
25
            appearcon = 2;
26
            con = 2;
27
        }
28
    }
29
    if (!i_ex(writer))
30
    {
31
        appearcon = 2;
32
        con = 2;
33
    }
34
    if (appearcon == 2)
35
        safe_delete(writer);
36
}