Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_ch4_PDC05_Create_0

(view raw script w/o annotations or w/e)
1
con = -1;
2
customcon = 0;
3
toriel_marker = -4;
4
susie_marker = -4;
5
door_marker = -4;
6
leaf_fall = false;
7
leaf_fall_timer = 0;
8
susie_change = false;
9
clothes_fly = false;
10
clothes_fly_timer = 0;
11
susie_clothes_marker = 
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; }
(267, 314, spr_susie_clothes_fly);
12
kris_clothes_marker = 
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; }
(315, 320, spr_kris_clothes_fly);
13
block_church = global.plot < 290;
14
if (block_church)
15
{
16
    var door_block = instance_create(280, 300, obj_solidblockLight);
17
    with (door_block)
18
        image_xscale = 2;
19
    var door_readable = instance_create(door_block.x, door_block.y, obj_readable_room1);
20
    with (door_readable)
21
    {
22
        image_xscale = 2;
23
        extflag = "locked_church_door";
24
    }
25
}
26
with (obj_npc_room)
27
    instance_destroy();
28
with (obj_npc_room_animated)
29
    instance_destroy();
30
if (global.plot >= 30 && global.plot < 40)
31
{
32
    con = 0;
33
    snd_free_all();
34
    toriel_marker = 
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; }
(340, 328, spr_toriel_walk_down_church);
35
    with (toriel_marker)
36
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
37
    susie_marker = 
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; }
(277, 302, spr_susie_walk_down_church);
38
    with (susie_marker)
39
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
40
    door_marker = 
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; }
(283, 264, spr_church_door);
41
    with (door_marker)
42
        depth = 96770;
43
    door_marker.image_index = 1;
44
    susie_clothes_marker.visible = 0;
45
    kris_clothes_marker.visible = 0;
46
    var milk_npc = instance_create(510, 250, obj_npc_room);
47
    milk_npc.sprite_index = spr_npc_milklooker;
48
    with (milk_npc)
49
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
50
    if (i_ex(obj_church_event))
51
        obj_church_event.depth = door_marker.depth + 10;
52
    with (obj_mainchara)
53
    {
54
        x = 305;
55
        y = 309;
56
    }
57
    with (obj_caterpillarchara)
58
        instance_destroy();
59
}
60
else
61
{
62
    if (global.plot < 100)
63
    {
64
        susie_clothes_marker.sprite_index = spr_susie_clothes_land;
65
        susie_clothes_marker.x = 202;
66
        susie_clothes_marker.y = 347;
67
        kris_clothes_marker.sprite_index = spr_kris_clothes_land;
68
        kris_clothes_marker.x = 379;
69
        kris_clothes_marker.y = 353;
70
        susie_clothes_readable = instance_create(susie_clothes_marker.x, susie_clothes_marker.y, obj_readable_room1);
71
        kris_clothes_readable = instance_create(kris_clothes_marker.x, kris_clothes_marker.y, obj_readable_room1);
72
        with (susie_clothes_marker)
73
            depth = 900000;
74
        with (kris_clothes_marker)
75
            depth = 900000;
76
    }
77
    else
78
    {
79
        with (susie_clothes_marker)
80
            instance_destroy();
81
        with (kris_clothes_marker)
82
            instance_destroy();
83
    }
84
    instance_destroy();
85
}