Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_ch4_DCA13_Create_0

(view raw script w/o annotations or w/e)
1
con = -1;
2
customcon = 0;
3
if (global.plot >= 200)
4
{
5
    var door_smoke = instance_create(301, 43, obj_ch4_DCA13_door);
6
    var door_lock = 
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; }
(320, 70, bg_church_entrance_door_lock);
7
    door_lock.image_blend = merge_color(c_white, c_navy, 0.6);
8
    door_lock.depth = 400100;
9
    if (global.plot < 210)
10
    {
11
        con = 0;
12
        
scr_setparty
scr_setparty

function
scr_setparty(arg0 = false, arg1 = false, arg2 = false)
{ var kris = obj_mainchara; var slot = 0; var __make = true; if (!i_ex(kris)) __make = false;
scr_losechar();
safe_delete(obj_caterpillarchara); if (arg0 == true) {
scr_getchar(2);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 2, slot))
{ halign = (global.darkzone == 0) ? 3 : 6; valign = (global.darkzone == 0) ? 6 : 16; x -= halign; y -= valign; } } slot++; } if (arg1 == true) {
scr_getchar(3);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 3, slot))
{ halign = 2; valign = 12; x -= halign; y -= valign; } } slot++; } if (arg2 == true) {
scr_getchar(4);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 4, slot))
{ halign = (global.darkzone == 0) ? 2 : 4; valign = (global.darkzone == 0) ? 9 : 18; x -= halign; y -= valign; } } slot++; } }
(1, 0, 0);
13
        whiteall = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(-10, -10, spr_pixel_white);
14
        whiteall.image_xscale = 999;
15
        whiteall.image_yscale = 999;
16
        whiteall.depth = 100;
17
        walk_timer = 0;
18
    }
19
    if (global.plot < 220)
20
    {
21
        var door_readable = instance_create(300, 85, obj_readable_room1);
22
        with (door_readable)
23
        {
24
            image_xscale = 2;
25
            extflag = "church_door";
26
        }
27
    }
28
    if (global.plot >= 240)
29
    {
30
        with (door_smoke)
31
            instance_destroy();
32
        with (door_lock)
33
            instance_destroy();
34
    }
35
    if (global.plot < 290)
36
    {
37
        var door_block = instance_create(300, 85, obj_solidblock);
38
        with (door_block)
39
            image_xscale = 2;
40
        var door_block_south = instance_create(300, 240, obj_solidblock);
41
        with (door_block_south)
42
            image_xscale = 2;
43
        with (obj_doorAny)
44
        {
45
            if (y < 80)
46
                instance_destroy();
47
            else if (y > 220)
48
                instance_destroy();
49
        }
50
    }
51
}
52
else
53
{
54
    instance_destroy();
55
}