Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_dw_church_pianopiece_rightprophecy_Step_0

(view raw script w/o annotations or w/e)
1
scr_populatechars
scr_populatechars

function
scr_populatechars()
{ if (!variable_instance_exists(id, "kris")) kris = 0; if (!variable_instance_exists(id, "ralsei")) ralsei = 0; if (!variable_instance_exists(id, "susie")) susie = 0; if (!variable_instance_exists(id, "noelle")) noelle = 0; if (kris == 0) { with (obj_mainchara) other.kris = id; } if (susie == 0) { with (obj_caterpillarchara) { if (name == "susie") other.susie = id; } } if (ralsei == 0) { with (obj_caterpillarchara) { if (name == "ralsei") other.ralsei = id; } } if (noelle == 0) { with (obj_caterpillarchara) { if (name == "noelle") other.noelle = id; } } }
();
2
if (con == 0 && global.interact == 0)
3
{
4
    var trig = 
scr_trigcheck
scr_trigcheck

function
scr_trigcheck(arg0)
{ var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, obj_mainchara)) ____trig++; } } } return ____trig; } function scr_trigcheck_ext(arg0, arg1 = id) { var ____trig = 0; if (is_string(arg0)) { with (obj_trigger) { if (extflag == arg0) { if (place_meeting(x, y, arg1)) ____trig++; } } } return ____trig; }
("prophecy");
5
    if (trig)
6
    {
7
        global.flag[886] = 1;
8
        global.interact = 1;
9
        prophecyactive = 1;
10
        con = 1.1;
11
    }
12
}
13
if (con == 1.01)
14
{
15
    timer++;
16
    if (timer == 15)
17
        prophecyactive = 1;
18
    if (timer == 30)
19
    {
20
        with (obj_mainchara)
21
            ignoredepth = 0;
22
        global.interact = 1;
23
        global.facing = 2;
24
        con = 1.1;
25
    }
26
}
27
if (con == 1.1)
28
{
29
    con = 2;
30
    with (instance_create(x, y, obj_ch4_DCA08A))
31
        con = 1;
32
}
33
if (con == 1 && !i_ex(obj_ch4_DCA08A))
34
{
35
    con = 2;
36
    proptrig = 1;
37
}
38
if (con == 2)
39
    proptrig = 1;
40
if (proptrig == 1)
41
{
42
    prophecyactive = 0;
43
    with (obj_trigger)
44
    {
45
        if (extflag == "prophecy")
46
        {
47
            if (place_meeting(x, y, obj_mainchara))
48
                other.prophecyactive = 1;
49
        }
50
    }
51
}
52
roomglow.active = prophecyactive;
53
prophecy.active = prophecyactive;
54
if (global.flag[886] == 0)
55
{
56
    if (prophecyactive)
57
        scr_setflag(886, 1);
58
}