Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_room_castle_tv_kikky_Step_0

related scripts: Alarm_0Alarm_1Create_0Other_5Step_0

(view raw script w/o annotations or w/e)
1
if (con < 0)
2
    exit;
3
if (con == 1 && !d_ex() && global.interact == 0)
4
{
5
    con = 100;
6
    global.interact = 1;
7
    global.msc = -99;
8
    
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");
9
    msgsetloc(0, 
* (This game cost 1 bobillion dollars to play.)Wait for input
"* (This game cost 1 bobillion dollars to play.)/", "obj_room_castle_tv_kikky_slash_Step_0_gml_13_0"
);
10
    msgsetloc(1, 
* (The coin slot is a mile long.)Wait for inputClose Message
"* (The coin slot is a mile long.)/%", "obj_room_castle_tv_kikky_slash_Step_0_gml_14_0"
);
11
    var _d = d_make();
12
    _d.side = 0;
13
}
14
if (con == 99 && !d_ex() && global.interact == 0)
15
{
16
    con = 100;
17
    global.interact = 1;
18
    global.msc = -99;
19
    
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");
20
    msgsetloc(0, 
* (Coolant.)Wait for inputClose Message
"* (Coolant.)/%", "obj_room_castle_tv_kikky_slash_Step_0_gml_28_0"
);
21
    var _d = d_make();
22
    _d.side = 0;
23
}
24
if (con == 2 && !d_ex() && global.interact == 0)
25
{
26
    con = 3;
27
    global.interact = 1;
28
    global.msc = -99;
29
    global.choice = -1;
30
    global.choicemsg[0] = stringsetloc(
#Use
"#Use", "obj_room_castle_tv_kikky_slash_Step_0_gml_42_0"
);
31
    global.choicemsg[1] = stringsetloc(
#Don't
"#Don't", "obj_room_castle_tv_kikky_slash_Step_0_gml_43_0"
);
32
    global.choicemsg[2] = "";
33
    global.choicemsg[3] = "";
34
    
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");
35
    if (is_tigerbomb)
36
        msgsetloc(0, 
* (It's the TIGERBOMB.)Wait for inputClose Message
"* (It's the TIGERBOMB.)/%", "obj_room_castle_tv_kikky_slash_Step_0_gml_49_0"
);
37
    else
38
        msgsetloc(0, 
* (It's the KIKKYBOMB.)Wait for input
"* (It's the KIKKYBOMB.)/", "obj_room_castle_tv_kikky_slash_Step_0_gml_51_0"
);
39
    msgnext("\\C2 ");
40
    var _d = d_make();
41
    _d.side = 0;
42
}
43
if (con == 3)
44
{
45
    if (is_tigerbomb)
46
    {
47
        if (!i_ex(obj_dialoguer))
48
            con = 4;
49
    }
50
    else if (global.choice != -1)
51
    {
52
        k_d(1);
53
        if (global.choice == 1)
54
        {
55
            con = -1;
56
            global.interact = 0;
57
        }
58
        else
59
        {
60
            con = 4;
61
        }
62
    }
63
}
64
if (con == 4)
65
{
66
    if (is_tigerbomb)
67
    {
68
        with (bomb_marker)
69
        {
70
            snd_play(snd_badexplosion);
71
            with (scr_marker_fancy(room_width / 2, room_height / 2, 4209))
72
            {
73
                depth = -1000;
74
                image_speed = 1;
75
                image_xscale = 15;
76
                image_yscale = 15;
77
                timer = 0;
78
                
79
                step_func = function()
80
                {
81
                    timer++;
82
                    if (timer > 16)
83
                        instance_destroy();
84
                };
85
            }
86
            instance_destroy();
87
        }
88
        with (bomb_interact)
89
            instance_destroy();
90
        alarm[1]
 = 6;
gml_Object_obj_room_castle_tv_kikky_Alarm_1.gml

with (debris_interact) x = xstart; debris_marker =
scr_dark_marker(504, 310, spr_coolant_debris);
with (debris_marker)
scr_depth();
91
        con = 100;
92
    }
93
    else
94
    {
95
        with (bomb_marker)
96
        {
97
            y = 
scr_approach
scr_approach

function
scr_approach(arg0, arg1, arg2)
{ if (arg0 < arg1) { arg0 += arg2; if (arg0 > arg1) return arg1; } else { arg0 -= arg2; if (arg0 < arg1) return arg1; } return arg0; }
(y, ystart - 160, 4);
98
            if (y == (ystart - 160))
99
            {
100
                snd_play(snd_kikkyspace);
101
                for (var i = 0; i < 8; i++)
102
                {
103
                    with (scr_marker_fancy(x + 20, y + 20, 6468))
104
                    {
105
                        motion_set((i / 8) * 360, 6);
106
                        friction = 0.5;
107
                        depth = -1000;
108
                        image_speed = 1;
109
                        timer = 0;
110
                        
111
                        step_func = function()
112
                        {
113
                            timer++;
114
                            if (timer > 20)
115
                                instance_destroy();
116
                        };
117
                    }
118
                }
119
                instance_create(x + 20, y + 20, obj_kikky);
120
                other.con = 5;
121
                instance_destroy();
122
            }
123
        }
124
    }
125
}
126
if (con == 5)
127
{
128
    with (bomb_interact)
129
        instance_destroy();
130
    with (bomb_collider)
131
        instance_destroy();
132
    con = -1;
133
    global.interact = 0;
134
}
135
if (con == 100 && !d_ex())
136
{
137
    con = -1;
138
    global.interact = 0;
139
}