Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_dw_fcastle_pinkroom_Create_0

related scripts: Create_0 Draw_0Step_0

(view raw script w/o annotations or w/e)
1
layer_set_visible("CUT_ASSETS", 0);
2
layer_set_visible("debug_assets", 0);
3
layer_set_visible("NPCs", false);
4
con = 0;
5
timer = 0;
6
init = 0;
7
path_layer_alpha = 0;
8
cuttimer = 0;
9
ora_actor = -4;
10
orange_jump = 0;
11
orange_cooldown = 0;
12
orange_shake = 0;
13
PROGRESS_FLAG = 1818;
14
_SHORTCUT_BIT = 0;
15
_DOOR_TALK_BIT = 1;
16
cutscenecon = 0;
17
PINK_FLAG = 1846;
18
if (scr_flag_get_ext(PROGRESS_FLAG, _SHORTCUT_BIT) == 0)
19
    scr_flag_set_ext(PROGRESS_FLAG, _SHORTCUT_BIT, 1);
20
21
path_alpha_set = function()
22
{
23
    if (event_type == ev_draw)
24
    {
25
        if (event_number == 0)
26
        {
27
            with (obj_dw_fcastle_pinkroom)
28
            {
29
                shader_replace_simple_set_hook(33);
30
                shader_set_uniform_f(u_alpha, path_layer_alpha);
31
            }
32
        }
33
    }
34
};
35
36
path_layer_reset = function()
37
{
38
    if (event_type == ev_draw)
39
    {
40
        if (event_number == 0)
41
            shader_replace_simple_reset_hook();
42
    }
43
};
44
45
path_layer = layer_get_id("TILES_Newpath");
46
u_alpha = shader_get_uniform(shd_alpha, "alpha");
47
layer_shader(path_layer, 33);
48
layer_script_begin(path_layer, path_alpha_set);
49
myinteract = 0;
50
ferrol = -4;
51
seenferrol = scr_flag_get_ext(1762, 1, 2);
52
if (global.flag[PINK_FLAG] >= 2)
53
{
54
    if (seenferrol)
55
        instance_create_depth(0, 0, 0, obj_dw_fcastle_pinkroom_ferrol);
56
}
57
pinkbomb = -4;
58
if ((global.tempflag[96] > 0 || global.flag[1913] == 1) && global.flag[1908] == 0)
59
{
60
    pinkbomb = scr_makenpc_fromasset(findsprite(spr_pinkbomb));
61
    global.flag[1913] = 1;
62
    if (global.tempflag[92] != 0)
63
        global.flag[1914] = global.tempflag[92] % 3;
64
    with (pinkbomb.marker)
65
    {
66
        if (global.flag[1914] == 1)
67
            sprite_index = spr_pinkbomb_easy;
68
        if (global.flag[1914] == 2)
69
            sprite_index = spr_pinkbomb_hard;
70
    }
71
    
scr_setnpclogic
scr_setnpclogic

function
scr_setnpclogic(arg0, arg1, arg2)
{ if (arg0 == -4) {
scr_debug_print("Failed to add NPC logic");
exit; } if (arg0.marker.sprite_index == spr_debug_40x40) arg0.marker.visible = 0; with (instance_create(0, 0, obj_npc_wrapper)) { if (variable_struct_exists(arg1, "animspeed")) animspeed = arg1.animspeed; if (variable_struct_exists(arg1, "typer")) typer = arg1.typer; if (variable_struct_exists(arg1, "alwaysanimate")) alwaysanimate = arg1.alwaysanimate; npc = arg0; if (!variable_instance_exists(npc.id, "dialogue_side")) npc.dialogue_side = -1; setdialogue = arg2; choices = []; for (var i = 3; i < argument_count; i++) array_push(choices, argument[i]); } }
(pinkbomb,
72
    {
73
        alwaysanimate: true,
74
        animspeed: 0.2
75
    }, function(arg0)
76
    {
77
        
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");
78
        msgsetloc(0, 
* (It's a pink bomb. There's a dial on the back.)Wait for input
"* (It's a pink bomb. There's a dial on the back.)/", "obj_dw_fcastle_pinkroom_slash_Create_0_gml_115_0"
);
79
        msgnextloc(
* (Seems you can alter how mean the bombs are.)Wait for input
"* (Seems you can alter how mean the bombs are.)/", "obj_dw_fcastle_pinkroom_slash_Create_0_gml_116_0"
);
80
        global.choicemsg[0] = stringsetloc(
Nicer bombs
"Nicer bombs", "obj_dw_fcastle_pinkroom_slash_Create_0_gml_117_0"
);
81
        global.choicemsg[1] = stringsetloc(
Meaner bombs
"Meaner bombs", "obj_dw_fcastle_pinkroom_slash_Create_0_gml_118_0"
);
82
        global.choicemsg[2] = stringsetloc(
Default
"Default", "obj_dw_fcastle_pinkroom_slash_Create_0_gml_119_0"
);
83
        msgnext("\\C3 ");
84
        return 1;
85
    }, function()
86
    {
87
        if (global.choice == 0)
88
        {
89
            snd_play(snd_pink_laugh_short);
90
            
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");
91
            msgsetloc(0, 
* (The bombs became "NICE".)Wait for inputClose Message
"* (The bombs became \"NICE\".)/%", "obj_dw_fcastle_pinkroom_slash_Create_0_gml_127_0"
);
92
            global.flag[1914] = 1;
93
            global.tempflag[92] = 1;
94
            with (pinkbomb)
95
                marker.sprite_index = spr_pinkbomb_easy;
96
            return 0;
97
        }
98
        else if (global.choice == 1)
99
        {
100
            snd_play(snd_pink_trip);
101
            
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");
102
            msgsetloc(0, 
* (The bombs became "MEAN"...Delay 11 maybe other things are mean,Delay 11 too.)Wait for inputClose Message
"* (The bombs became \"MEAN\"..^1. maybe other things are mean^1, too.)/%", "obj_dw_fcastle_pinkroom_slash_Create_0_gml_136_0"
);
103
            global.flag[1914] = 2;
104
            global.tempflag[92] = 2;
105
            with (pinkbomb)
106
                marker.sprite_index = spr_pinkbomb_hard;
107
            return 0;
108
        }
109
        else
110
        {
111
            snd_play(snd_pink_huh);
112
            
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");
113
            msgsetloc(0, 
* (The bombs were kept on the intended setting.)Wait for inputClose Message
"* (The bombs were kept on the intended setting.)/%", "obj_dw_fcastle_pinkroom_slash_Create_0_gml_145_0"
);
114
            global.flag[1914] = 0;
115
            global.tempflag[92] = 3;
116
            with (pinkbomb)
117
                marker.sprite_index = spr_pinkbomb;
118
            return 0;
119
        }
120
    });
121
}