Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_classscene_Create_0

(view raw script w/o annotations or w/e)
1
door = 
scr_marker
scr_marker

function
scr_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; } return thismarker; }
(236, 26, spr_classdoor);
2
with (door)
3
    
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
4
con = 0;
5
customcon = 0;
6
customconb = 0;
7
global.facing = 0;
8
if (global.chapter <= 2)
9
{
10
    noelle_npc = instance_create(76, 152, obj_npc_facing);
11
    berdly_npc = instance_create(148, 152, obj_npc_facing);
12
}
13
introtime = 0;
14
nonpctime = 0;
15
sunsettime = 0;
16
doormake = 0;
17
alphystime = 0;
18
if (global.chapter == 1)
19
{
20
    if (global.plot < 2)
21
        introtime = 1;
22
    if (global.plot >= 3)
23
    {
24
        sunsettime = 1;
25
        doormake = 1;
26
    }
27
}
28
if (global.chapter == 2)
29
{
30
    if (global.plot < 3)
31
        introtime = 1;
32
    if (global.plot >= 3)
33
    {
34
        nonpctime = 1;
35
        doormake = 1;
36
        alphystime = 1;
37
    }
38
    if (global.plot >= 5)
39
    {
40
        nonpctime = 1;
41
        alphystime = 0;
42
    }
43
    if (global.plot >= 100)
44
        sunsettime = 1;
45
}
46
if (global.chapter > 2)
47
    doormake = 1;
48
if (introtime == 1)
49
{
50
    snd_free_all();
51
    global.facing = 0;
52
    con = 1;
53
    with (obj_mainchara)
54
    {
55
        x = 240;
56
        y = 30;
57
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
58
    }
59
    alphys = 
scr_marker
scr_marker

function
scr_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; } return thismarker; }
(50, 50, spr_alphysd);
60
    with (alphys)
61
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
62
    global.interact = 1;
63
}
64
if (nonpctime == 1)
65
{
66
    with (obj_npc_facing)
67
        instance_destroy();
68
    if (global.plot < 200)
69
    {
70
        with (obj_tem_school)
71
            instance_destroy();
72
    }
73
}
74
if (doormake == 1)
75
{
76
    doorb = instance_create(242, 48, obj_doorB);
77
    with (door)
78
        depth = 900000;
79
    with (doorb)
80
    {
81
        doorFacing = 0;
82
        doorPreset = 1;
83
    }
84
}
85
if (sunsettime == 1)
86
{
87
    with (obj_npc_facing)
88
        instance_destroy();
89
    if (global.plot < 200)
90
    {
91
        with (obj_tem_school)
92
            instance_destroy();
93
    }
94
    sunset = 
scr_marker
scr_marker

function
scr_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; } return thismarker; }
(3, 0, spr_torielclass_sunsetoverlay);
95
    with (sunset)
96
    {
97
        image_alpha = 0.4;
98
        depth = 2000;
99
    }
100
    instance_destroy();
101
}