Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_dw_church_legender_Step_0

(view raw script w/o annotations or w/e)
1
siner++;
2
timer++;
3
if (triggertype == 0)
4
{
5
    if (camerax() > startingx)
6
        show = true;
7
    if (camerax() > endingx || camerax() < startingx)
8
        show = false;
9
}
10
if (triggertype == 1)
11
{
12
    show = false;
13
    with (obj_triggervolume)
14
    {
15
        if (place_meeting(x, y, obj_mainchara))
16
            other.show = true;
17
    }
18
}
19
if (show == true)
20
{
21
    image_alpha = lerp(image_alpha, 1, 0.25);
22
    activetimer++;
23
}
24
else
25
{
26
    image_alpha = lerp(image_alpha, 0, 0.25);
27
}
28
if (image_only)
29
    exit;
30
if (line_index < (maxlines - 1) && textactivetimer[stringmax - 1] > (textstartwait[stringmax - 1] + textendwait[stringmax - 1]))
31
{
32
    activetimer = 0;
33
    set_lines = true;
34
}
35
if (set_lines)
36
{
37
    set_lines = false;
38
    line_index++;
39
    stringmax = array_length_1d(prophecy_text[prophecy_index][line_index]);
40
    for (var i = 0; i < stringmax; i++)
41
    {
42
        textstring[i] = prophecy_text[prophecy_index][line_index][i];
43
        if (alt_sides)
44
        {
45
            textx[i] = 0;
46
            if ((line_index % 2) == 1)
47
                relx = 400;
48
        }
49
        texty[i] = 40 + (i * 40);
50
        textstartwait[i] = 1 + (i * 90);
51
        texttimer[i] = 0;
52
        textactivetimer[i] = 0;
53
        textchar[i] = 0;
54
        textendwait[i] = (line_index == (maxlines - 1) && (stringmax - 1) == 0) ? 180 : 60;
55
    }
56
}
57
if (show && line_index == (maxlines - 1) && textactivetimer[stringmax - 1] > (textstartwait[stringmax - 1] + textendwait[stringmax - 1]))
58
{
59
    triggertype = -1;
60
    show = false;
61
    with (obj_cutscene_stairlooper)
62
        legend_finish = true;
63
}