Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_room_castle_tv_zone_3_Create_0

(view raw script w/o annotations or w/e)
1
con = -1;
2
solo_mode = !
scr_havechar
scr_havechar

function
scr_havechar(arg0)
{ var checker = arg0; if (checker == "susie" || checker == "su" || checker == "s") checker = 2; if (checker == "ralsei" || checker == "ra" || checker == "r") checker = 3; if (checker == "noelle" || checker == "no" || checker == "n") checker = 4; _rreturn = 0; if (global.char[0] == checker) _rreturn = 1; if (global.char[1] == checker) _rreturn = 1; if (global.char[2] == checker) _rreturn = 1; return _rreturn; }
(3) && !
scr_havechar
scr_havechar

function
scr_havechar(arg0)
{ var checker = arg0; if (checker == "susie" || checker == "su" || checker == "s") checker = 2; if (checker == "ralsei" || checker == "ra" || checker == "r") checker = 3; if (checker == "noelle" || checker == "no" || checker == "n") checker = 4; _rreturn = 0; if (global.char[0] == checker) _rreturn = 1; if (global.char[1] == checker) _rreturn = 1; if (global.char[2] == checker) _rreturn = 1; return _rreturn; }
(2);
3
maus_shake = true;
4
maus_transform = false;
5
maus_transform_timer = 0;
6
hand_marker = -4;
7
mike_controller = -4;
8
treasure_active = true;
9
treasure_con = 0;
10
11
show_treasure = function()
12
{
13
    if (global.flag[1693] == 0)
14
        global.flag[1693] = 1;
15
    var treasure = instance_create(92, 210, obj_treasure_room);
16
    with (treasure)
17
    {
18
        itemflag = 1703;
19
        itemtype = "item";
20
        itemidchest = 34;
21
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
22
    }
23
};
24
25
statue_cat_tall = instance_create(82, 94, obj_mike_statue_cat_overworld);
26
with (statue_cat_tall)
27
    sprite_index = spr_statue_cat_tall;
28
statue_cat_tall.init("statue_cat_tall", show_treasure);
29
maus_marker = 
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; }
(930, 280, spr_npc_maus_scared);
30
with (maus_marker)
31
    
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
32
maus_block = instance_create(maus_marker.x, maus_marker.y + 10, obj_solidblockDark);
33
with (maus_block)
34
    image_yscale = 0.5;
35
maus_readable = instance_create(maus_marker.x, maus_marker.y + 10, obj_readable_room1);
36
with (maus_readable)
37
{
38
    extflag = "maus";
39
    image_xscale = 2;
40
}
41
statue_cat = instance_create(880, 158, obj_mike_statue_cat);
42
with (statue_cat)
43
    
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
44
statue_block = instance_create(statue_cat.x, statue_cat.y + 60, obj_solidblockDark);
45
statue_readable = instance_create(statue_cat.x + 8, statue_cat.y + 70, obj_readable_room1);
46
with (statue_readable)
47
{
48
    extflag = "statue_cat";
49
    image_xscale = 2;
50
    image_yscale = 2;
51
}
52
53
show_convo = function(arg0)
54
{
55
    switch (arg0)
56
    {
57
        case "statue_cat_tall":
58
            con = 1;
59
            break;
60
        case "maus":
61
            con = 5;
62
            break;
63
        case "statue_cat":
64
            con = 10;
65
            break;
66
    }
67
};
68
69
remove_cat = function()
70
{
71
    with (statue_cat)
72
        instance_destroy();
73
    with (statue_block)
74
        instance_destroy();
75
    with (statue_readable)
76
        instance_destroy();
77
};
78
79
remove_maus = function()
80
{
81
    with (maus_marker)
82
        instance_destroy();
83
    with (maus_block)
84
        instance_destroy();
85
    with (maus_readable)
86
        instance_destroy();
87
};
88
89
remove_cat_tall = function()
90
{
91
    with (statue_cat_tall)
92
        clean_up();
93
};
94
95
if (global.flag[1692] == 1)
96
{
97
    mike_controller = instance_create(0, 0, obj_mike_controller);
98
    remove_maus();
99
    remove_cat();
100
}
101
if (global.flag[1693] == 1)
102
    remove_cat_tall();
103
for (var _i = 0; _i < instance_number(obj_mouse_hat); _i++)
104
{
105
    var _hat = instance_find(obj_mouse_hat, _i);
106
    _hat.image_index = _i;
107
}