Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_ch5_DW05_Create_0

(view raw script w/o annotations or w/e)
1
plotvalue = 265;
2
plotvalueB = 270;
3
plotvalueC = 264;
4
con = -1;
5
customcon = 0;
6
glowtile_active = false;
7
wind_sound = snd_loop(snd_strongwind_loop);
8
snd_volume(wind_sound, 0, 0);
9
door_pos = findspriteinfo(spr_flowery_door);
10
glowtiles = [];
11
if (global.plot >= plotvalueB)
12
{
13
    instance_destroy();
14
}
15
else
16
{
17
    door_block = instance_create(door_pos.x, door_pos.y + 84, obj_custom_interactable_solid);
18
    door_block.image_xscale = 80;
19
    door_block.image_yscale = 40;
20
    
21
    door_event = function()
22
    {
23
        var _puzzleOn = false;
24
        with (obj_glowtile_puzzle_new)
25
        {
26
            if (state != 0)
27
                _puzzleOn = true;
28
        }
29
        if (!_puzzleOn)
30
        {
31
            var _flagval = 
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ return global.flag[arg0]; } function scr_flag_name_get(arg0) { var v = global.flagname[arg0]; return is_undefined(v) ? "*unknown flag*" : v; } function scr_flag_get_ext(arg0, arg1, arg2 = 1) { if (arg1 < 0)
scr_flag_get(arg0);
else return scr_get_bitmask_value(global.flag[arg0], arg1, arg2); }
(1887);
32
            myinteract = 3;
33
            global.interact = 1;
34
            if (_flagval == 0)
35
            {
36
                
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; if (global.darkzone == 1) global.typer = 89; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("no_name");
37
                msgsetloc(0, 
* (It's locked by a pressure plate puzzle.)Wait for inputClose Message
"* (It's locked by a pressure plate puzzle.)/%", "obj_ch5_DW05_slash_Create_0_gml_39_0"
);
38
            }
39
            else
40
            {
41
                
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; if (global.darkzone == 1) global.typer = 89; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("no_name");
42
                msgsetloc(0, 
* (You don't have a pressure plate puzzle to put into the keyhole.)Wait for inputClose Message
"* (You don't have a pressure plate puzzle to put into the keyhole.)/%", "obj_ch5_DW05_slash_Create_0_gml_44_0"
);
43
            }
44
            mydialoguer = instance_create(0, 0, obj_dialoguer);
45
            
scr_flag_set
scr_flag_set

function
scr_flag_set(arg0, arg1)
{ global.flag[arg0] = arg1; } function scr_flag_set_ext(arg0, arg1, arg2, arg3 = 1) { if (arg1 < 0)
scr_flag_set(arg0, arg2);
else global.flag[arg0] = scr_set_bitmask_value(global.flag[arg0], arg1, arg2, arg3); }
(1887, 1);
46
        }
47
    };
48
    
49
    door_block.trigger_event = method(door_block.id, door_event);
50
    door_sprite = 
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; }
(door_pos.x, door_pos.y, spr_flowery_door);
51
    with (door_sprite)
52
    {
53
        y -= sprite_height;
54
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
55
        y += sprite_height;
56
    }
57
    white_flash = 
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; }
(0, 0, spr_whitepixel);
58
    white_flash.image_xscale = room_width;
59
    white_flash.image_yscale = room_height;
60
    white_flash.visible = false;
61
    white_flash.image_alpha = 0;
62
    wind_effect = instance_create_depth(0, 0, -500, obj_leafpetals);
63
    wind_effect.wind_direction = 180;
64
    wind_effect.image_alpha = 0;
65
    wind_effect.wind_speed = 90;
66
    var _farleft = 9999;
67
    var _farright = 0;
68
    with (obj_glowtile_new)
69
    {
70
        if (bbox_left < _farleft)
71
            _farleft = bbox_left;
72
        if (bbox_left > _farright)
73
            _farright = bbox_left;
74
    }
75
    farright = _farright;
76
    farleft = _farleft;
77
    glowtiles = [];
78
    campos = findspriteinfo(spr_debug_cameraregionpreview, undefined, c_lime);
79
    clamppos = findspriteinfo(spr_debug_cameraregionpreview, undefined, c_lime);
80
    if (global.plot == plotvalueC)
81
    {
82
        with (obj_camera_clamper)
83
        {
84
            if (image_blend == c_lime)
85
                instance_destroy();
86
        }
87
    }
88
    if (global.plot == plotvalue)
89
    {
90
        with (obj_camera_clamper)
91
        {
92
            if (image_blend == c_lime)
93
                instance_destroy();
94
        }
95
        su_pos2 = findspriteinfo(spr_susie_walk_right_dw_cup);
96
        su_pos3 = findspriteinfo(spr_debug_sumarker, undefined, c_red);
97
        fl_pos2 = findspriteinfo(spr_flowery_idle);
98
        su_markerb = 
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; }
(su_pos2.x, su_pos2.y, su_pos2.sprite_index);
99
        fl_markerb = 
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; }
(fl_pos2.x, fl_pos2.y, spr_flowery_idle);
100
    }
101
}
102
layer_set_visible(layer_get_id("ASSETS_BUSHES"), false);
103
layer_set_visible(layer_get_id("ASSETS_DEBUG_ETC"), false);