Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_queencar_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 1)
2
{
3
    global.interact = 1;
4
    contimer = 0;
5
    msgtimer = 0;
6
    swantimer = 0;
7
    if (swan == 0)
8
    {
9
        active = 1;
10
        con = 2;
11
        obj_mainchara.visible = 0;
12
        with (obj_caterpillarchara)
13
            visible = 0;
14
    }
15
    if (swan == 1)
16
    {
17
        con = 1.5;
18
        with (obj_mainchara)
19
        {
20
            fun = 1;
21
            global.facing = 1;
22
            
scr_move_to_point_over_time
scr_move_to_point_over_time

function
scr_move_to_point_over_time(arg0, arg1, arg2)
{ _mmm = instance_create(x, y, obj_move_to_point); _mmm.target = id; _mmm.movex = arg0; _mmm.movey = arg1; _mmm.movemax = arg2; return _mmm; }
(obj_queencar.x + obj_queencar.swanmaincharax, obj_queencar.y + obj_queencar.swanmaincharay, 15);
23
        }
24
        with (obj_caterpillarchara)
25
        {
26
            follow = 0;
27
            fun = 1;
28
            sprite_index = rsprite;
29
            
scr_move_to_point_over_time
scr_move_to_point_over_time

function
scr_move_to_point_over_time(arg0, arg1, arg2)
{ _mmm = instance_create(x, y, obj_move_to_point); _mmm.target = id; _mmm.movex = arg0; _mmm.movey = arg1; _mmm.movemax = arg2; return _mmm; }
((obj_queencar.x + obj_queencar.swanmaincharax) - 50, (obj_queencar.y + obj_queencar.swanmaincharay) - 12, 15);
30
        }
31
    }
32
}
33
if (con == 1.5)
34
{
35
    if (room == room_dw_mansion_acid_tunnel_puzzle_entrance && global.flag[343 made_high_five] == 1)
36
    {
37
        swantimer++;
38
        if (swantimer >= 15)
39
        {
40
            con = 1.6;
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 (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; } if (global.fighting == 1) ...
("ralsei");
42
            msgsetloc(0, 
Face J* Let's go,Delay 11 Kris!Wait for inputClose Message
"\\EJ* Let's go^1, Kris!/%", "obj_queencar_slash_Step_0_gml_36_0"
);
43
            d_make();
44
        }
45
    }
46
    else
47
    {
48
        swantimer++;
49
        if (swantimer >= 15)
50
        {
51
            swantimer = 0;
52
            con = 2;
53
            active = 1;
54
        }
55
    }
56
}
57
if (con == 1.6 && !d_ex())
58
{
59
    swantimer++;
60
    if (swantimer >= 15)
61
    {
62
        swantimer = 0;
63
        con = 2;
64
        active = 1;
65
    }
66
}
67
if (active == 1)
68
{
69
    wx = 4;
70
    if (room >= room_dw_mansion_acid_tunnel)
71
        wx = 2;
72
    wy = 0;
73
    if (up_h())
74
        wy = -2;
75
    if (down_h())
76
        wy = 2;
77
    if (left_p())
78
    {
79
        if (backwardstalkcon == 0)
80
        {
81
            backwardstalkcon = 1;
82
            dobackwardstalk = 1;
83
        }
84
    }
85
    movex = 0;
86
    movey = 0;
87
    if (!place_meeting(x + wx, y + wy, obj_solidblock) && !place_meeting(x + wx, y + wy, obj_solidenemy))
88
    {
89
        movex = 1;
90
        movey = 1;
91
    }
92
    else
93
    {
94
        if (!place_meeting(x + wx, y, obj_solidblock) && !place_meeting(x + wx, y, obj_solidenemy))
95
            movex = 1;
96
        if (!place_meeting(x, y + wy, obj_solidblock) && !place_meeting(x, y + wy, obj_solidenemy))
97
            movey = 1;
98
    }
99
    if (movex == 1 && !pause_x_move)
100
        x += wx;
101
    if (movey == 1 && !pause_y_move)
102
        y += wy;
103
    if (swan == 0)
104
    {
105
        obj_mainchara.x = x + 85;
106
        obj_mainchara.y = y;
107
    }
108
    else
109
    {
110
        obj_mainchara.x = x + swanmaincharax;
111
        obj_mainchara.y = y + swanmaincharay;
112
        if (instance_exists(obj_caterpillarchara))
113
        {
114
            obj_caterpillarchara.x = (x + swanmaincharax) - 50;
115
            obj_caterpillarchara.y = (y + swanmaincharay) - 12;
116
        }
117
    }
118
    
scr_depth
scr_depth

function
scr_depth()
{ depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
119
}
120
if (con == 2)
121
{
122
    if (!pause_auto_talk)
123
    {
124
        if (instance_exists(obj_writer))
125
        {
126
            if (obj_writer.halt != 0)
127
            {
128
                msgtimer++;
129
                if (msgtimer >= 60)
130
                {
131
                    with (obj_writer)
132
                        forcebutton1 = 1;
133
                    msgtimer = 0;
134
                }
135
            }
136
            else
137
            {
138
                msgtimer = 0;
139
            }
140
        }
141
        else if (dotalk == 1)
142
        {
143
            msgsetloc(0, 
* ...Wait for inputClose Message
"* .../%", "obj_queencar_slash_Step_0_gml_110_0"
);
144
            if (swan == 1)
145
            {
146
                if (talkcon == 1)
147
                {
148
                    
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 (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; } if (global.fighting == 1) ...
("ralsei");
149
                    global.fe = 0;
150
                    msgsetloc(0, 
Face M* Now, we have to think of some way to distract Queen...Wait for inputClose Message
"\\EM* Now, we have to think of some way to distract Queen.../%", "obj_queencar_slash_Step_0_gml_147_0"
);
151
                    with (obj_ch2_scene21)
152
                        queen_heckle = true;
153
                }
154
                if (talkcon == 2)
155
                {
156
                    
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 (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; } if (global.fighting == 1) ...
("ralsei");
157
                    global.fe = 0;
158
                    msgsetloc(0, 
Face M* What are these...Delay 11 Little houses?Wait for inputClose Message
"\\EM* What are these..^1. Little houses?/%", "obj_queencar_slash_Step_0_gml_155_0"
);
159
                    with (obj_ch2_scene21)
160
                        queen_heckle = true;
161
                }
162
                if (talkcon == 3)
163
                {
164
                    with (obj_ch2_scene21)
165
                        queen_heckle = true;
166
                }
167
            }
168
            if (global.msg[0] != "* .../%")
169
            {
170
                d = d_make();
171
                d.side = 0;
172
                d.zurasu = 1;
173
            }
174
            dotalk = 0;
175
        }
176
    }
177
}