Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_ch2_scene25_Create_0

related scripts: Alarm_0Create_0 Step_0

(view raw script w/o annotations or w/e)
1
con = -1;
2
customcon = 0;
3
timer = 0;
4
forceend2 = 0;
5
shortened = false;
6
caterpillarmove = false;
7
if (
scr_sideb_get_phase
scr_sideb_get_phase

function
scr_sideb_get_phase()
{ var phase = 0; if (global.flag[916 snowgrave_fail] == 0) { if (global.flag[915 snowgrave_plot] > 0 && global.flag[915 snowgrave_plot] < 4) phase = 1; if (global.flag[915 snowgrave_plot] >= 4 && global.flag[915 snowgrave_plot] < 7) phase = 2; if (global.flag[915 snowgrave_plot] >= 7 && global.flag[915 snowgrave_plot] < 20) phase = 3; if (global.flag[915 snowgrave_plot] >= 20) phase = 4; } return phase; }
() >= 3)
8
{
9
    instance_destroy();
10
}
11
else if (global.chapter != 2)
12
{
13
    instance_destroy();
14
}
15
else if (global.plot >= 165)
16
{
17
    var savepoint = instance_create(905, 40, obj_savepoint);
18
    with (savepoint)
19
        
scr_depth
scr_depth

function
scr_depth()
{ depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
20
    berdlynpc = instance_create(895, 228, obj_npc_sign);
21
    berdlynpc.sprite_index = (global.flag[457 spared_berdly] == 1) ? spr_berdly_hurt_kneel : spr_berdly_hurt_kneel_burnt;
22
    with (berdlynpc)
23
        
scr_depth
scr_depth

function
scr_depth()
{ depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
24
    instance_destroy();
25
}
26
else
27
{
28
    with (obj_mainchara)
29
    {
30
        x = 26;
31
        y = 246;
32
    }
33
    caterpillarmove = true;
34
    if (global.tempflag[31] == 1)
35
        shortened = true;
36
    berdlynpc = instance_create(895, 228, obj_npc_sign);
37
    berdlynpc.sprite_index = (global.flag[457 spared_berdly] == 1) ? spr_berdly_hurt_kneel : spr_berdly_hurt_kneel_burnt;
38
    with (berdlynpc)
39
        
scr_depth
scr_depth

function
scr_depth()
{ depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
40
    berdlynpc.visible = 0;
41
    berdly_npc_realign = false;
42
    berdly_full_spare = false;
43
}