Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_ch2_room_mansion_east_2f_a_Create_0

(view raw script w/o annotations or w/e)
1
con = 0;
2
key = -1;
3
dooropen = -1;
4
keyfloat = false;
5
floattimer = 0;
6
keysparkle = false;
7
sparkletimer = 0;
8
fadeplatters = false;
9
keyXPos = 0;
10
keyYPos = 0;
11
make_forcefield = false;
12
forcefield = -4;
13
if (global.chapter != 2)
14
{
15
    instance_destroy();
16
}
17
else
18
{
19
    if (global.flag[344 solved_saucer_puzzle?] == 1)
20
    {
21
        dooropen = 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; }
(180, 40, spr_dw_mansion_door_open);
22
        dooropen.depth = 899999;
23
    }
24
    else
25
    {
26
        doorlocked = 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; }
(180, 40, spr_dw_mansion_door_closed);
27
        doorlocked.depth = 899999;
28
        monty = instance_create(170, 240, obj_saucer_monty);
29
        exitcollider = instance_create(180, 80, obj_solidblock);
30
        exitcollider.image_xscale = 4;
31
        exitcollider.image_yscale = 4;
32
    }
33
    for (var i = 0; i < 3; i++)
34
    {
35
        table[i] = instance_create(870 + (321 * i), 200, obj_saucer);
36
        table[i].image_speed = 0;
37
        with (table[i])
38
        {
39
            mode = 1;
40
            if (i == 0)
41
                contentsprite = spr_ch2_gimmick_saucer_wig;
42
            if (i == 1)
43
                contentsprite = spr_saucer_checkmark;
44
            if (i == 2)
45
            {
46
                if (global.flag[357 recruit_hacker] == 1)
47
                    contentsprite = spr_platter_cursor;
48
                else
49
                    contentsprite = spr_platter_smallsaucer;
50
            }
51
            scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
52
        }
53
        var table_collider = instance_create(table[i].x, table[i].y + 40, obj_soliddark);
54
        table_collider.image_xscale = 2.5;
55
    }
56
    swatch_npc = instance_create(1760, 135, obj_npc_butler);
57
    with (swatch_npc)
58
        scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
59
    nubert_npc = instance_create(805, 225, obj_npc_room);
60
    nubert_npc.sprite_index = spr_npc_nubert_aristocrat;
61
    with (nubert_npc)
62
        scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
63
    mouse_npc = instance_create(975, 220, obj_npc_room);
64
    mouse_npc.sprite_index = spr_npc_mousemillian;
65
    with (mouse_npc)
66
        scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
67
    yesman_npc = instance_create(1120, 185, obj_npc_room);
68
    yesman_npc.sprite_index = spr_npc_yesman;
69
    with (yesman_npc)
70
        scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
71
    with (yesman_npc)
72
        scr_flip
scr_flip

function scr_flip(arg0) { if (arg0 == "h" || arg0 == "x") { x += ((sprite_get_width(sprite_index) - (sprite_get_xoffset(sprite_index) * 2)) * image_xscale); image_xscale = -image_xscale; } else { y += ((sprite_get_height(sprite_index) - (sprite_get_yoffset(sprite_index) * 2)) * image_yscale); image_yscale = -image_yscale; } }
("x");
73
    yeswoman_npc = instance_create(1300, 185, obj_npc_room);
74
    yeswoman_npc.sprite_index = spr_npc_yesman_ponytail;
75
    with (yeswoman_npc)
76
        scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
77
    if (global.flag[357 recruit_hacker] == 1)
78
    {
79
        hacker_npc = instance_create(1625, 180, obj_npc_room);
80
        hacker_npc.sprite_index = spr_npc_cursor_wig;
81
        with (hacker_npc)
82
            scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
83
    }
84
    wig_npc = instance_create(1430, 205, obj_npc_room);
85
    wig_npc.sprite_index = spr_npc_wig_robot;
86
    with (wig_npc)
87
        scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
88
}