Deltarune (Chapter 5) script viewer

← back to main script listing

gml_GlobalScript_scr_cutscene_commands

(view raw script w/o annotations or w/e)
1
function 
scr_cutscene_commands
scr_cutscene_commands

function
scr_cutscene_commands()
{ if (_c == "delaycmd") { delaycmd = instance_create(0, 0, obj_cutscene_delaycmd); delaycmd.master_object = master_object; delaycmd.command_actor[0] = command_actor[i]; delaycmd.alarm[0] = command_arg1[i]; delaycmd._c = command_arg2[i]; delaycmd.command_arg1[0] = command_arg3[i]; delaycmd.command_arg2[0] = command_arg4[i]; delaycmd.command_arg3[0] = command_arg5[i]; delaycmd.command_arg4[0] = command_arg6[i]; if (instant) { delaycmd.alarm[0] = 0; delaycmd.instant = 1; with (delaycmd) event_user(0); } } if (_c == "msgcmd") { if (!v_ex("msgcmd") || !i_ex(msgcmd)) msgcmd = instance_create(0, 0, obj_cutscene_messagecmd); var _count = msgcmd.count; msgcmd.master_object = master_object; msgcmd.command_actor[_count] = command_actor[i]; msgcmd.command_num[_count] = global.msgno; msgcmd.command[_count] = command_arg1[i]; msgcmd.command_arg1[_count] = command_arg2[i]; msgcmd.command_arg2[_count] = command_arg3[i]; msgcmd.command_arg3[_count] = command_arg4[i]; msgcmd.command_arg4[_count] = command_arg5[i]; msgcmd.count++; } if (_c == "walk") { if (!instant) { actor_move = instance_create(0, 0, obj_move_actor); actor_move.target = command_actor[i]; actor_move.direction_word = command_arg1[i]; actor_move.speed = command_arg2[i]; actor_move.time = command_arg3[i]; with (actor_move) event_user(8); } else { command_actor[i].x += lengthdir_x(command_arg2[i] * command_arg3[i], (
scr_facing_letter_to_number(command_arg1[i]) * 90) - 90);
command_actor[i].y += lengthdir_y(command_arg2[i] * command_arg3[i], (
scr_facing_letter_to_number(command_arg1[i]) * 90) - 90);
} } if (_c == "walkto") { var _object = command_arg1[i]; var _tx = _object.x + command_arg2[i]; var _ty = _object.y + command_arg3[i]; if (command_arg5[i] == true && command_arg6[i] == true) { var _yyoff1 = command_actor[i].sprite_height - command_actor[i].sprite_yoffset; var _yyoff2 = _object.sprite_height - _object.sprite_yoffset; var _xxoff1 = (command_actor[i].sprite_width / 2) - command_actor[i].sprite_xoffset; var _xxoff2 = (_object.sprite_width / 2) - _object.sprite_xoffset; _ty += (_yyoff2 - _yyoff1); _tx += (_xxoff1 - _xxoff2); } else if (command_arg5[i] == true && command_arg6[i] == false) { _tx -= ((command_actor[i].sprite_width / 2) - command_actor[i].sprite_xoffset); _ty -= (command_actor[i].sprite_height - command_actor[i].sprite_yoffset); } command_arg1[i] = _tx; command_arg2[i] = _ty; command_arg3[i] = command_arg4[i]; _c = "walkdirect"; } if (_c == "walkdirect") { if (!instant) { actor_move = instance_create(0, 0, obj_move_to_point); actor_move.target = command_actor[i]; actor_move.movex = command_arg1[i]; actor_move.movey = command_arg2[i]; if (command_arg1[i] == 0) actor_move.movex = command_actor[i].x; if (command_arg2[i] == 0) actor_move.movey = command_actor[i].y; if (command_arg3[i] >= 0) { actor_move.movemax = command_arg3[i]; } else { var __walktime = round(point_distance(command_actor[i].x, command_actor[i].y, command_arg1[i], command_arg2[i]) / -command_arg3[i]); if (__walktime < 1) __walktime = 1; actor_move.movemax = __walktime; if (command_arg4[i] == 1) ...
()
2
{
3
    if (_c == "delaycmd")
4
    {
5
        delaycmd = instance_create(0, 0, obj_cutscene_delaycmd);
6
        delaycmd.master_object = master_object;
7
        delaycmd.command_actor[0] = command_actor[i];
8
        delaycmd.alarm[0] = command_arg1[i];
9
        delaycmd._c = command_arg2[i];
10
        delaycmd.command_arg1[0] = command_arg3[i];
11
        delaycmd.command_arg2[0] = command_arg4[i];
12
        delaycmd.command_arg3[0] = command_arg5[i];
13
        delaycmd.command_arg4[0] = command_arg6[i];
14
        if (instant)
15
        {
16
            delaycmd.alarm[0] = 0;
17
            delaycmd.instant = 1;
18
            with (delaycmd)
19
                event_user(0);
20
        }
21
    }
22
    if (_c == "msgcmd")
23
    {
24
        if (!v_ex("msgcmd") || !i_ex(msgcmd))
25
            msgcmd = instance_create(0, 0, obj_cutscene_messagecmd);
26
        var _count = msgcmd.count;
27
        msgcmd.master_object = master_object;
28
        msgcmd.command_actor[_count] = command_actor[i];
29
        msgcmd.command_num[_count] = global.msgno;
30
        msgcmd.command[_count] = command_arg1[i];
31
        msgcmd.command_arg1[_count] = command_arg2[i];
32
        msgcmd.command_arg2[_count] = command_arg3[i];
33
        msgcmd.command_arg3[_count] = command_arg4[i];
34
        msgcmd.command_arg4[_count] = command_arg5[i];
35
        msgcmd.count++;
36
    }
37
    if (_c == "walk")
38
    {
39
        if (!instant)
40
        {
41
            actor_move = instance_create(0, 0, obj_move_actor);
42
            actor_move.target = command_actor[i];
43
            actor_move.direction_word = command_arg1[i];
44
            actor_move.speed = command_arg2[i];
45
            actor_move.time = command_arg3[i];
46
            with (actor_move)
47
                event_user(8);
48
        }
49
        else
50
        {
51
            command_actor[i].x += lengthdir_x(command_arg2[i] * command_arg3[i], (
scr_facing_letter_to_number
scr_facing_letter_to_number

function
scr_facing_letter_to_number(arg0)
{ if (arg0 == "d") return 0; if (arg0 == "r") return 1; if (arg0 == "l") return 3; if (arg0 == "u") return 2; }
(command_arg1[i]) * 90) - 90);
52
            command_actor[i].y += lengthdir_y(command_arg2[i] * command_arg3[i], (
scr_facing_letter_to_number
scr_facing_letter_to_number

function
scr_facing_letter_to_number(arg0)
{ if (arg0 == "d") return 0; if (arg0 == "r") return 1; if (arg0 == "l") return 3; if (arg0 == "u") return 2; }
(command_arg1[i]) * 90) - 90);
53
        }
54
    }
55
    if (_c == "walkto")
56
    {
57
        var _object = command_arg1[i];
58
        var _tx = _object.x + command_arg2[i];
59
        var _ty = _object.y + command_arg3[i];
60
        if (command_arg5[i] == true && command_arg6[i] == true)
61
        {
62
            var _yyoff1 = command_actor[i].sprite_height - command_actor[i].sprite_yoffset;
63
            var _yyoff2 = _object.sprite_height - _object.sprite_yoffset;
64
            var _xxoff1 = (command_actor[i].sprite_width / 2) - command_actor[i].sprite_xoffset;
65
            var _xxoff2 = (_object.sprite_width / 2) - _object.sprite_xoffset;
66
            _ty += (_yyoff2 - _yyoff1);
67
            _tx += (_xxoff1 - _xxoff2);
68
        }
69
        else if (command_arg5[i] == true && command_arg6[i] == false)
70
        {
71
            _tx -= ((command_actor[i].sprite_width / 2) - command_actor[i].sprite_xoffset);
72
            _ty -= (command_actor[i].sprite_height - command_actor[i].sprite_yoffset);
73
        }
74
        command_arg1[i] = _tx;
75
        command_arg2[i] = _ty;
76
        command_arg3[i] = command_arg4[i];
77
        _c = "walkdirect";
78
    }
79
    if (_c == "walkdirect")
80
    {
81
        if (!instant)
82
        {
83
            actor_move = instance_create(0, 0, obj_move_to_point);
84
            actor_move.target = command_actor[i];
85
            actor_move.movex = command_arg1[i];
86
            actor_move.movey = command_arg2[i];
87
            if (command_arg1[i] == 0)
88
                actor_move.movex = command_actor[i].x;
89
            if (command_arg2[i] == 0)
90
                actor_move.movey = command_actor[i].y;
91
            if (command_arg3[i] >= 0)
92
            {
93
                actor_move.movemax = command_arg3[i];
94
            }
95
            else
96
            {
97
                var __walktime = round(point_distance(command_actor[i].x, command_actor[i].y, command_arg1[i], command_arg2[i]) / -command_arg3[i]);
98
                if (__walktime < 1)
99
                    __walktime = 1;
100
                actor_move.movemax = __walktime;
101
                if (command_arg4[i] == 1)
102
                {
103
                    cs_wait_amount = ceil(__walktime);
104
                    if (instant)
105
                        cs_wait_amount = 1;
106
                    cs_wait_timer = 0;
107
                    waiting = 1;
108
                    breakme = 1;
109
                }
110
            }
111
        }
112
        else
113
        {
114
            command_actor[i].x = command_arg1[i];
115
            command_actor[i].y = command_arg2[i];
116
        }
117
    }
118
    if (_c == "markerwalkdirect")
119
    {
120
        if (!instant)
121
        {
122
            marker_move = instance_create(0, 0, obj_move_to_point);
123
            marker_move.target = command_arg1[i];
124
            marker_move.movex = command_arg2[i];
125
            marker_move.movey = command_arg3[i];
126
            if (command_arg5[i] != -1)
127
            {
128
                marker_move.animate = true;
129
                marker_move.animate_sprite = command_arg5[i];
130
                marker_move.animate_sprite_return = command_arg1[i].sprite_index;
131
                marker_move.animate_sprite_speed = command_arg6[i];
132
                marker_move.animate_sprite_return_speed = command_arg1[i].image_speed;
133
            }
134
            if (command_arg2[i] == 0)
135
                marker_move.movex = command_arg1[i].x;
136
            if (command_arg3[i] == 0)
137
                marker_move.movey = command_arg1[i].y;
138
            if (command_arg4[i] >= 0)
139
            {
140
                marker_move.movemax = command_arg4[i];
141
            }
142
            else
143
            {
144
                var __walktime = point_distance(command_arg1[i].x, command_arg1[i].y, command_arg2[i], command_arg3[i]) / -command_arg4[i];
145
                if (__walktime < 1)
146
                    __walktime = 1;
147
                marker_move.movemax = __walktime;
148
            }
149
        }
150
        else
151
        {
152
            command_arg1[i].x = command_arg2[i];
153
            command_arg1[i].y = command_arg3[i];
154
        }
155
    }
156
    if (_c == "msgset")
157
        msgset(command_arg1[i], command_arg2[i]);
158
    if (_c == "msgnext")
159
        msgnext(command_arg1[i]);
160
    if (_c == "talk")
161
    {
162
        if (!instant)
163
        {
164
            mydialoguer = instance_create(0, 0, i_ex(obj_plat_player) ? obj_dialoguer_plat : obj_dialoguer);
165
            if (msgside >= 0)
166
                mydialoguer.side = msgside;
167
            if (stay)
168
                mydialoguer.stay = stay;
169
            if (runcheck)
170
                mydialoguer.runcheck = runcheck;
171
            if (preventcskip)
172
                mydialoguer.preventcskip = preventcskip;
173
            mydialoguer.zurasu = zurasu;
174
            stay = 0;
175
        }
176
    }
177
    if (_c == "msgface")
178
        
scr_anyface
scr_anyface

function
scr_anyface(arg0, arg1, arg2)
{ _speakerC = arg0; _msgno = arg1; _emotion = arg2; if (is_real(arg2)) { if (arg2 >= 10) { if (arg2 < 36) _emotion = chr(55 + arg2); else emotion = chr(61 + arg2); } } _speaker = string_lower(_speakerC); msgsetsub(arg1, "* Face ~1 not found/", _speaker); if (_speaker == "susie" || _speaker == "sus")
scr_susface(_msgno, _emotion);
if (_speaker == "ralsei" || _speaker == "ral")
scr_ralface(_msgno, _emotion);
if (_speaker == "noelle" || _speaker == "noe")
scr_noeface(_msgno, _emotion);
if (_speaker == "toriel" || _speaker == "tor")
scr_torface(_msgno, _emotion);
if (_speaker == "asgore" || _speaker == "asg")
scr_asgface(_msgno, _emotion);
if (_speaker == "king" || _speaker == "kin")
scr_kingface(_msgno, _emotion);
if (_speaker == "rudy" || _speaker == "rud")
scr_rudface(_msgno, _emotion);
if (_speaker == "lancer" || _speaker == "lan")
scr_lanface(_msgno, _emotion);
if (_speaker == "berdly" || _speaker == "ber") msgsetsubloc(arg1, "\\TX \\F0 \\E~1 \\FB \\TB %", string(_emotion), "scr_anyface_slash_scr_anyface_gml_23_0"); if (_speaker == "alphys" || _speaker == "alp") msgsetsubloc(arg1, "\\TX \\F0 \\E~1 \\Fa \\Ta %", string(_emotion), "scr_anyface_slash_scr_anyface_gml_24_0"); if (_speaker == "none" || _speaker == "x" || _speaker == "no name" || _speaker == "no_name")
scr_noface(_msgno);
if (_speaker == "rouxls" || _speaker == "rou")
scr_rurusface(_msgno, _emotion);
if (_speaker == "queen" || _speaker == "que") msgsetsubloc(arg1, "\\TX \\F0 \\E~1 \\FQ \\TQ %", string(_emotion), "scr_anyface_slash_scr_anyface_gml_27_0"); if (_speaker == "queen2" || _speaker == "que2") msgsetsubloc(arg1, "\\TX \\F0 \\E~1 \\F0 \\Tq %", string(_emotion), "scr_anyface_slash_scr_anyface_gml_28_0_b"); if (_speaker == "sans" || _speaker == "san") msgsetsubloc(arg1, "\\TX \\F0 \\E~1 \\Fs \\Ts %", string(_emotion), "scr_anyface_slash_scr_anyface_gml_28_0"); if (_speaker == "undyne" || _speaker == "und") msgsetsubloc(arg1, "\\TX \\F0 \\E~1 \\FU \\TU %", string(_emotion), "scr_anyface_slash_scr_anyface_gml_29_0"); if (_speaker == "jockington") msgsetsub(arg1, "\\TX \\F0 \\E~1 \\FJ \\Tj %", string(_emotion)); if (_speaker == "burgerpants") msgsetsubloc(arg1, "\\TX \\F0 \\E~1 \\Fb \\T0 %", string(_emotion), "scr_anyface_slash_scr_anyface_gml_30_0"); if (_speaker == "sneo") msgsetsub(arg1, "\\TX \\F0 \\E~1 \\Tp %", string(_emotion)); if (_speaker == "carol") msgsetsub(arg1, "\\TX \\F0 \\E~1 \\FC \\TC %", string(_emotion)); if (_speaker == "jackenstein") msgset(arg1, "\\TX \\F0 \\Tf %", string(_emotion)); if (_speaker == "tenna") msgsetsub(arg1, "\\TX \\F0 \\E~1 \\Tv %", string(_emotion)); if (_speaker == "bratty") msgsetsub(arg1, "\\TX \\F0 \\E~1 \\Fy \\Ty %", string(_emotion)); if (_speaker == "catti") msgsetsub(arg1, "\\TX \\F0 \\E~1 \\Fi \\Ti %", string(_emotion)); if (_speaker == "catty") msgsetsub(arg1, "\\TX \\F0 \\E~1 \\Fk \\Tk %", string(_emotion)); if (_speaker == "flowery") msgsetsub(arg1, "\\TX \\F0 \\E~1 \\FF \\TF %", string(_emotion)); if (_speaker == "flowery_noface") msgsetsub(arg1, "\\TX \\F0 \\TF %", string(_emotion)); if (_speaker == "flowery_s") msgsetsub(arg1, "\\TX \\F0 \\E~1 \\FF \\Th %", string(_emotion)); if (_speaker == "aqua") msgsetloc(arg1, "\\TX \\F0 \\T4 %", "scr_anyface_slash_scr_anyface_gml_50_0"); if (_speaker == "seth" || _speaker == "purple") msgsetloc(arg1, "\\TX \\F0 \\T5 %", "scr_anyface_slash_scr_anyface_gml_52_0"); if (_speaker == "yellow") msgsetloc(arg1, "\\TX \\F0 \\T6 %", "scr_anyface_slash_scr_anyface_gml_53_0"); if (_speaker == "orange") msgsetloc(arg1, "\\TX \\F0 \\T7 %", "scr_anyface_slash_scr_anyface_gml_54_0"); if (_speaker == "blue") msgsetloc(arg1, "\\TX \\F0 \\T8 %", "scr_anyface_slash_scr_anyface_gml_55_0"); if (_speaker == "green") msgsetloc(arg1, "\\TX \\F0 \\T9 %", "scr_anyface_slash_scr_anyface_gml_56_0"); if (_speaker == "pink") msgsetloc(arg1, "\\TX \\F0 \\TP %", "scr_anyface_slash_scr_anyface_gml_57_0"); if (_speaker == "opuppet") msgsetloc(arg1, "\\TX \\F0 \\TO %", "scr_anyface_slash_scr_anyface_gml_58_0"); if (_speaker == "bluef") msgsetsubloc(arg1, "\\TX \\Fâ—˜ \\E~1 \\T8 %", string(_emotion), "scr_anyface_slash_scr_anyface_gml_60_0"); }
(command_arg1[i], command_arg2[i], command_arg3[i]);
179
    if (_c == "msgfacenext")
180
        
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
(command_arg1[i], command_arg2[i]);
181
    if (_c == "msgside")
182
    {
183
        if (command_arg1[i] == "any")
184
            msgside = -1;
185
        if (command_arg1[i] == "top")
186
            msgside = 0;
187
        if (command_arg1[i] == "bottom")
188
            msgside = 1;
189
        if (command_arg1[i] == "zurasuon")
190
            zurasu = 1;
191
        if (command_arg1[i] == "zurasuoff")
192
            zurasu = 0;
193
    }
194
    if (_c == "msgstay")
195
        stay = command_arg1[i];
196
    if (_c == "msgruncheck")
197
        runcheck = command_arg1[i];
198
    if (_c == "msgpreventcskip")
199
        preventcskip = command_arg1[i];
200
    if (_c == "emote")
201
    {
202
        if (!instant)
203
        {
204
            command_actor[i].__arg0 = command_arg1[i];
205
            command_actor[i].__arg1 = command_arg2[i];
206
            command_actor[i].__arg2 = command_arg3[i];
207
            command_actor[i].__arg3 = command_arg4[i];
208
            if (command_arg3[i] == 0)
209
            {
210
                with (command_actor[i])
211
                    
scr_emote
scr_emote

function
scr_emote()
{ __dmult = 1 + global.darkzone; __emotebubble = instance_create(x, y - 15, obj_excblcon); __emotebubble.alarm[0] = argument[1]; __emotebubble.image_xscale = __dmult; __emotebubble.image_yscale = __dmult; __emotexoff = 0; __emoteyoff = 0; __anchorx = sprite_get_xoffset(sprite_index); if (argument[0] == "!") { __emotebubble.sprite_index = spr_exc; __emotebubble.y = y - (10 * __dmult); __emotexoff = 10 * __dmult; } if (argument[0] == "?") { __emotebubble.sprite_index = spr_emote_questionmark; __emotebubble.y = y - (10 * __dmult); __emotexoff = 10 * __dmult; } if (argument[0] == "...") { __emotebubble.sprite_index = spr_emote_ellipsis; __emotebubble.y = y - (10 * __dmult); __emotexoff = 10 * __dmult; } if (argument[0] == "note") { __emotebubble.sprite_index = spr_musblc; __emotebubble.y = y - (10 * __dmult); __emotexoff = 10 * __dmult; } if (argument_count >= 3) __emotexoff = argument[2]; if (argument_count >= 4) __emoteyoff = argument[3]; __emotebubble.y += __emoteyoff; if (image_xscale > 0) __emotebubble.x = (((x - (__anchorx * image_xscale)) + ((sprite_width / 2) * sign(image_xscale))) - (__emotebubble.sprite_width / 2)) + __emotexoff; else __emotebubble.x = ((x + (__anchorx * image_xscale)) - ((sprite_width / 2) * sign(image_xscale)) - (__emotebubble.sprite_width / 2)) + __emotexoff; }
(__arg0, __arg1);
212
            }
213
            else
214
            {
215
                with (command_actor[i])
216
                    
scr_emote
scr_emote

function
scr_emote()
{ __dmult = 1 + global.darkzone; __emotebubble = instance_create(x, y - 15, obj_excblcon); __emotebubble.alarm[0] = argument[1]; __emotebubble.image_xscale = __dmult; __emotebubble.image_yscale = __dmult; __emotexoff = 0; __emoteyoff = 0; __anchorx = sprite_get_xoffset(sprite_index); if (argument[0] == "!") { __emotebubble.sprite_index = spr_exc; __emotebubble.y = y - (10 * __dmult); __emotexoff = 10 * __dmult; } if (argument[0] == "?") { __emotebubble.sprite_index = spr_emote_questionmark; __emotebubble.y = y - (10 * __dmult); __emotexoff = 10 * __dmult; } if (argument[0] == "...") { __emotebubble.sprite_index = spr_emote_ellipsis; __emotebubble.y = y - (10 * __dmult); __emotexoff = 10 * __dmult; } if (argument[0] == "note") { __emotebubble.sprite_index = spr_musblc; __emotebubble.y = y - (10 * __dmult); __emotexoff = 10 * __dmult; } if (argument_count >= 3) __emotexoff = argument[2]; if (argument_count >= 4) __emoteyoff = argument[3]; __emotebubble.y += __emoteyoff; if (image_xscale > 0) __emotebubble.x = (((x - (__anchorx * image_xscale)) + ((sprite_width / 2) * sign(image_xscale))) - (__emotebubble.sprite_width / 2)) + __emotexoff; else __emotebubble.x = ((x + (__anchorx * image_xscale)) - ((sprite_width / 2) * sign(image_xscale)) - (__emotebubble.sprite_width / 2)) + __emotexoff; }
(__arg0, __arg1, __arg2, __arg3);
217
            }
218
        }
219
    }
220
    if (_c == "speaker")
221
        
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; ...
(command_arg1[i]);
222
    if (_c == "fe")
223
    {
224
        global.fe = command_arg1[i];
225
        if (command_arg2[i] != -2)
226
            global.fc = command_arg2[i];
227
    }
228
    if (_c == "msc")
229
    {
230
        global.msc = command_arg1[i];
231
        
scr_text
scr_text

function
scr_text(arg0)
{ switch (arg0) { case 0: break; case 10: global.choicemsg[0] = stringsetloc(
#Yes
"#Yes", "scr_text_slash_scr_text_gml_8_0"
);
global.choicemsg[1] = stringsetloc(
#No
"#No", "scr_text_slash_scr_text_gml_9_0"
);
global.choicemsg[2] = stringsetloc(
" ", "scr_text_slash_scr_text_gml_12_0_b"
);
global.choicemsg[3] = stringsetloc(
" ", "scr_text_slash_scr_text_gml_13_0_b"
);
global.msg[0] = stringsetloc(
* You really didn't want to throw it away.Wait for input
"* You really didn't want to throw it away./", "scr_text_slash_scr_text_gml_12_0"
);
global.msg[1] = stringsetloc(
* Throw it away anyway?Wait for input
"* Throw it away anyway?/", "scr_text_slash_scr_text_gml_13_0"
);
global.msg[2] = stringsetloc(
Choice type 2
"\\C2 ", "scr_text_slash_scr_text_gml_14_0"
);
if (global.chapter >= 2) msgsetloc(0,
* You took it from your pocket.Delay 11
* You have a very,Delay 11 very,Delay 11 bad feeling about throwing it away.Wait for input
"* You took it from your pocket^1.&* You have a \\cYvery^1, very^1, bad feeling\\c0 about throwing it away./", "scr_text_slash_scr_text_gml_19_0"
);
break; case 11: if (global.choice == 0) { global.flag[466 junkball_dropped] = 1; snd_play(snd_bageldefeat); global.msg[0] = stringsetloc(
* Hand shaking,Delay 11 you dropped the ball of junk on the ground.Wait for input
"* Hand shaking^1, you dropped the ball of junk on the ground./", "scr_text_slash_scr_text_gml_20_0"
);
global.msg[1] = stringsetloc(
* It broke into pieces.Wait for input
"* It broke into pieces./", "scr_text_slash_scr_text_gml_21_0"
);
global.msg[2] = stringsetloc(
* You felt bitter.Wait for inputClose Message
"* You felt bitter./%", "scr_text_slash_scr_text_gml_22_0"
);
script_execute(scr_litemshift, global.menucoord[1], 0); for (var i = 0; i < 12; i += 1) global.item[i] = 0; for (var i = 0; i < 48; i += 1) { global.armor[i] = 0; global.weapon[i] = 0; } } else { global.msg[0] = stringsetloc(
* You felt a feeling of relief.Wait for inputClose Message
"* You felt a feeling of relief./%", "scr_text_slash_scr_text_gml_34_0"
);
} break; case 100: global.msg[0] = stringsetloc(
* Hey, Kris!Delay 11 What's up?Delay 11
* Didja lose your pencil again?Wait for input
"* Hey, Kris^1! What's up^1?&* Didja lose your pencil again?/", "scr_text_slash_scr_text_gml_39_0"
);
global.msg[1] = stringsetloc(
Face 4* Here,Delay 11 you want the candy-cane one or the one with lights on it?Wait for input
"\\E4* Here^1, you want the candy-cane one or the one with lights on it?/", "scr_text_slash_scr_text_gml_40_0"
);
global.msg[2] = stringsetloc(
Face 1* Huh?Delay 11
* You want to be partners?Wait for input
"\\E1* Huh^1?&* You want to be partners?/", "scr_text_slash_scr_text_gml_41_0"
);
global.msg[3] = stringsetloc(
Face 4* Ummm...Delay 11 sorry...Delay 11
* Berdly already asked me...Wait for input
"\\E4* Ummm..^1. sorry..^1.&* Berdly already asked me.../", "scr_text_slash_scr_text_gml_42_0"
);
global.msg[4] = stringsetloc(
Face 0* But I could ask Ms. Alphys if we could make a group of 3!Wait for input
"\\E0* But I could ask Ms. Alphys if we could make a group of 3!/", "scr_text_slash_scr_text_gml_43_0"
);
global.msg[5] = stringsetloc(
Face 4* I'll ask if you're sure!

Not yet Yes. Ask.Choice type 1
"\\E4* I'll ask if you're sure!& &Not yet Yes. Ask.\\C1 ", "scr_text_slash_scr_text_gml_44_0"
);
global.msg[6] = stringsetloc(
" ", "scr_text_slash_scr_text_gml_47_0"
);
break; case 101: if (global.choice == 1) { global.msg[0] = stringsetloc(
Face 0* OK,Delay 11 I'll ask!Wait for input
"\\E0* OK^1, I'll ask!/", "scr_text_slash_scr_text_gml_51_0"
);
global.msg[1] = stringsetloc(
* Miss Alphys!Delay 11
* Umm,Delay 11 is it OK if we have a group of 3?Wait for inputClose Message
"* Miss Alphys^1!&* Umm^1, is it OK if we have a group of 3?/%", "scr_text_slash_scr_text_gml_52_0"
);
with (obj_classscene) con = 20; } if (global.choice == 0) global.msg[0] = stringsetloc(
Face 4* Yeah,Delay 11 I'm sure there's someone else you can ask!Wait for inputClose Message
"\\E4* Yeah^1, I'm sure there's someone else you can ask!/%", "scr_text_slash_scr_text_gml_57_0"
);
break; case 102: global.msg[0] = stringsetloc(
Face 0* Do you wanna be partners?
Not yet YesChoice type 1
"\\E0* Do you wanna be partners?&Not yet Yes\\C1 ", "scr_text_slash_scr_text_gml_62_0"
);
global.msg[1] = stringsetloc(
" ", "scr_text_slash_scr_text_gml_65_0"
);
break; case 103: if (global.choice == 1) { global.msg[0] = stringsetloc(
Face 0* OK,Delay 11 I'll ask!Wait for input
"\\E0* OK^1, I'll ask!/", "scr_text_slash_scr_text_gml_69_0"
);
global.msg[1] = stringsetloc(
* Miss Alphys!Delay 11
* Umm,Delay 11 is it OK if we have a group of 3?Wait for inputClose Message
"* Miss Alphys^1!&* Umm^1, is it OK if we have a group of 3?/%", "scr_text_slash_scr_text_gml_70_0"
);
with (obj_classscene) con = 20; } if (global.choice == 0) global.msg[0] = stringsetloc(
Face 4* Umm,Delay 11 OK.Delay 11
* You just keep doing your thing,Delay 11 Kris.Wait for inputClose Message
"\\E4* Umm^1, OK^1.&* You just keep doing your thing^1, Kris./%", "scr_text_slash_scr_text_gml_75_0"
);
break; case 104: global.msg[0] = stringsetloc(
Face 0* Alright.Delay 11
* Let's get this over with.Wait for input
"\\E0* Alright^1.&* Let's get this over with./", "scr_text_slash_scr_text_gml_80_0"
);
global.msg[1] = stringsetloc(
* We'll get more chalk.Delay 11
* Mosey back to class.Delay 11
* And then,Delay 11 Kris...Wait for input
"* We'll get more chalk^1.&* Mosey back to class^1.&* And then^1, Kris.../", "scr_text_slash_scr_text_gml_81_0"
);
global.msg[2] = stringsetloc(
Face 2* YOU'LL do our project.Wait for input
"\\E2* YOU'LL do our project./", "scr_text_slash_scr_text_gml_82_0"
);
global.msg[3] = stringsetloc(
* How's that sound?

Good BadChoice type 1
"* How's that sound?& &Good Bad\\C1 ", "scr_text_slash_scr_text_gml_83_0"
);
global.msg[4] = stringsetloc(
" ", "scr_text_slash_scr_text_gml_86_0"
);
break; case 105: global.msg[0] = stringsetloc(
Close MessageClose Message
" %%", "scr_text_slash_scr_text_gml_90_0"
);
break; case 110: global.choicemsg[0] = stringsetloc(
#Yes
"#Yes", "scr_text_slash_scr_text_gml_92_0"
);
global.choicemsg[1] = stringsetloc(
#No
"#No", "scr_text_slash_scr_text_gml_93_0"
);
global.choicemsg[2] = stringsetloc(
" ", "scr_text_slash_scr_text_gml_96_0"
);
global.choicemsg[3] = stringsetloc(
" ", "scr_text_slash_scr_text_gml_97_0"
);
if (global.flag[100 got_glowshard] == 0) { global.msg[0] = stringsetloc(
* (There's something glowing inside.)Wait for input
"* (There's something glowing inside.)/", "scr_text_slash_scr_text_gml_98_0"
);
global.msg[1] = stringsetloc(
* (Take it?)Wait for input
"* (Take it?)/ ", "scr_text_slash_scr_text_gml_99_0"
);
global.msg[2] = stringsetloc(
Choice type 2
" \\C2", "scr_text_slash_scr_text_gml_100_0"
);
} else { global.msg[0] = stringsetloc(
* (It's dark inside.)Wait for inputClose Message
"* (It's dark inside.)/%", "scr_text_slash_scr_text_gml_104_0"
);
} break; case 111: ...
(global.msc);
232
    }
233
    if (_c == "instancecreate")
234
    {
235
        _instance = instance_create(command_arg1[i], command_arg2[i], command_arg3[i]);
236
        if (i_ex(master_object))
237
            master_object.cutscene_instance = _instance;
238
    }
239
    if (_c == "varadd")
240
    {
241
        __chosenid = 0;
242
        if (command_arg1[i] == 0)
243
            __chosenid = command_actor[i];
244
        else
245
            __chosenid = command_arg1[i];
246
        var _varstart = variable_instance_get(__chosenid, command_arg2[i]);
247
        if (command_arg5[i] == 0)
248
        {
249
            command_arg3[i] += _varstart;
250
        }
251
        else
252
        {
253
            command_arg3[i] = _varstart;
254
            command_arg4[i] += _varstart;
255
        }
256
        _c = "var";
257
    }
258
    if (_c == "varto")
259
    {
260
        __chosenid = 0;
261
        if (command_arg1[i] == 0)
262
            __chosenid = command_actor[i];
263
        else
264
            __chosenid = command_arg1[i];
265
        command_arg3[i] = variable_instance_get(__chosenid, command_arg2[i]);
266
        _c = "var";
267
    }
268
    if (_c == "var")
269
    {
270
        if (instant)
271
        {
272
            if (command_arg5[i] != 0)
273
            {
274
                command_arg3[i] = command_arg4[i];
275
                command_arg5[i] = 0;
276
            }
277
        }
278
        __chosenid = 0;
279
        if (command_arg1[i] == 0)
280
            __chosenid = command_actor[i];
281
        else
282
            __chosenid = command_arg1[i];
283
        if (command_arg5[i] == 0)
284
        {
285
            variable_instance_set(__chosenid, command_arg2[i], command_arg3[i]);
286
        }
287
        else if (command_arg6[i] == 0)
288
        {
289
            
scr_lerpvar_instance
scr_lerpvar_instance

function
scr_lerpvar_instance()
{ __lerpvar = instance_create(0, 0, obj_lerpvar); __lerpvar.target = argument[0]; __lerpvar.varname = argument[1]; __lerpvar.pointa = argument[2]; __lerpvar.pointb = argument[3]; __lerpvar.maxtime = argument[4]; if (argument_count >= 6) __lerpvar.easetype = argument[5]; if (argument_count >= 7) __lerpvar.easeinout = argument[6]; return __lerpvar; } function scr_lerpcol_instance() { __lerpvar = instance_create(0, 0, obj_lerpvar); __lerpvar.target = argument[0]; __lerpvar.varname = argument[1]; __lerpvar.pointa = argument[2]; __lerpvar.pointb = argument[3]; __lerpvar.maxtime = argument[4]; __lerpvar.iscolor = true; if (argument_count >= 6) __lerpvar.easetype = argument[5]; if (argument_count >= 7) __lerpvar.easeinout = argument[6]; return __lerpvar; } function scr_lerp_var_instance() { if (argument_count >= 6) return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7) return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4);
} function scr_lerp_instance_var() { if (argument_count >= 6) return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7) return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4);
}
(__chosenid, command_arg2[i], command_arg3[i], command_arg4[i], command_arg5[i]);
290
        }
291
        else if (!is_string(command_arg6[i]))
292
        {
293
            
scr_lerpvar_instance
scr_lerpvar_instance

function
scr_lerpvar_instance()
{ __lerpvar = instance_create(0, 0, obj_lerpvar); __lerpvar.target = argument[0]; __lerpvar.varname = argument[1]; __lerpvar.pointa = argument[2]; __lerpvar.pointb = argument[3]; __lerpvar.maxtime = argument[4]; if (argument_count >= 6) __lerpvar.easetype = argument[5]; if (argument_count >= 7) __lerpvar.easeinout = argument[6]; return __lerpvar; } function scr_lerpcol_instance() { __lerpvar = instance_create(0, 0, obj_lerpvar); __lerpvar.target = argument[0]; __lerpvar.varname = argument[1]; __lerpvar.pointa = argument[2]; __lerpvar.pointb = argument[3]; __lerpvar.maxtime = argument[4]; __lerpvar.iscolor = true; if (argument_count >= 6) __lerpvar.easetype = argument[5]; if (argument_count >= 7) __lerpvar.easeinout = argument[6]; return __lerpvar; } function scr_lerp_var_instance() { if (argument_count >= 6) return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7) return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4);
} function scr_lerp_instance_var() { if (argument_count >= 6) return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7) return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4);
}
(__chosenid, command_arg2[i], command_arg3[i], command_arg4[i], command_arg5[i], command_arg6[i], "in");
294
        }
295
        else
296
        {
297
            var __easetype = real(string_digits(command_arg6[i]));
298
            if (string_char_at(command_arg6[i], 1) == "-")
299
            {
300
                __easetype *= -1;
301
                command_arg6[i] = string_delete(command_arg6[i], 1, 1);
302
            }
303
            command_arg6[i] = string_delete(command_arg6[i], 1, 1);
304
            
scr_lerpvar_instance
scr_lerpvar_instance

function
scr_lerpvar_instance()
{ __lerpvar = instance_create(0, 0, obj_lerpvar); __lerpvar.target = argument[0]; __lerpvar.varname = argument[1]; __lerpvar.pointa = argument[2]; __lerpvar.pointb = argument[3]; __lerpvar.maxtime = argument[4]; if (argument_count >= 6) __lerpvar.easetype = argument[5]; if (argument_count >= 7) __lerpvar.easeinout = argument[6]; return __lerpvar; } function scr_lerpcol_instance() { __lerpvar = instance_create(0, 0, obj_lerpvar); __lerpvar.target = argument[0]; __lerpvar.varname = argument[1]; __lerpvar.pointa = argument[2]; __lerpvar.pointb = argument[3]; __lerpvar.maxtime = argument[4]; __lerpvar.iscolor = true; if (argument_count >= 6) __lerpvar.easetype = argument[5]; if (argument_count >= 7) __lerpvar.easeinout = argument[6]; return __lerpvar; } function scr_lerp_var_instance() { if (argument_count >= 6) return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7) return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4);
} function scr_lerp_instance_var() { if (argument_count >= 6) return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7) return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else return
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4);
}
(__chosenid, command_arg2[i], command_arg3[i], command_arg4[i], command_arg5[i], __easetype, command_arg6[i]);
305
        }
306
    }
307
    if (_c == "script")
308
    {
309
        if (command_arg3[i] != -10)
310
        {
311
            var __sarg1 = command_arg2[i];
312
            var __sarg2 = command_arg3[i];
313
            var __sarg3 = command_arg4[i];
314
            var __sarg4 = command_arg5[i];
315
            var __sarg5 = command_arg6[i];
316
            var __sarg_counted = 3;
317
            if (command_arg4[i] == -3.14)
318
                __sarg_counted--;
319
            if (command_arg5[i] == -3.14)
320
                __sarg_counted--;
321
            if (command_arg6[i] == -3.14)
322
                __sarg_counted--;
323
            if (command_arg3[i] == 0)
324
            {
325
                if (__sarg_counted == 0)
326
                {
327
                    with (command_arg1[i])
328
                        script_execute(__sarg1);
329
                }
330
                if (__sarg_counted == 1)
331
                {
332
                    with (command_arg1[i])
333
                        script_execute(__sarg1, __sarg3);
334
                }
335
                if (__sarg_counted == 2)
336
                {
337
                    with (command_arg1[i])
338
                        script_execute(__sarg1, __sarg3, __sarg4);
339
                }
340
                if (__sarg_counted == 3)
341
                {
342
                    with (command_arg1[i])
343
                        script_execute(__sarg1, __sarg3, __sarg4, __sarg5);
344
                }
345
            }
346
            else
347
            {
348
                if (__sarg_counted == 0)
349
                {
350
                    with (command_arg1[i])
351
                        
scr_script_repeat
scr_script_repeat

function
scr_script_repeat()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = -2; __scriptdelay.max_time = argument[1]; __scriptdelay.rate = argument[2]; __scriptdelay.constant = 1; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 3); __i++) __scriptdelay.script_arg[__i] = argument[__i + 3]; __scriptdelay.arg_count = argument_count - 3; return __scriptdelay; }
(__sarg1, -1, __sarg2);
352
                }
353
                if (__sarg_counted == 1)
354
                {
355
                    with (command_arg1[i])
356
                        
scr_script_repeat
scr_script_repeat

function
scr_script_repeat()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = -2; __scriptdelay.max_time = argument[1]; __scriptdelay.rate = argument[2]; __scriptdelay.constant = 1; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 3); __i++) __scriptdelay.script_arg[__i] = argument[__i + 3]; __scriptdelay.arg_count = argument_count - 3; return __scriptdelay; }
(__sarg1, -1, __sarg2, __sarg3);
357
                }
358
                if (__sarg_counted == 2)
359
                {
360
                    with (command_arg1[i])
361
                        
scr_script_repeat
scr_script_repeat

function
scr_script_repeat()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = -2; __scriptdelay.max_time = argument[1]; __scriptdelay.rate = argument[2]; __scriptdelay.constant = 1; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 3); __i++) __scriptdelay.script_arg[__i] = argument[__i + 3]; __scriptdelay.arg_count = argument_count - 3; return __scriptdelay; }
(__sarg1, -1, __sarg2, __sarg3, __sarg4);
362
                }
363
                if (__sarg_counted == 3)
364
                {
365
                    with (command_arg1[i])
366
                        
scr_script_repeat
scr_script_repeat

function
scr_script_repeat()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = -2; __scriptdelay.max_time = argument[1]; __scriptdelay.rate = argument[2]; __scriptdelay.constant = 1; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 3); __i++) __scriptdelay.script_arg[__i] = argument[__i + 3]; __scriptdelay.arg_count = argument_count - 3; return __scriptdelay; }
(__sarg1, -1, __sarg2, __sarg3, __sarg4, __sarg5);
367
                }
368
            }
369
        }
370
        else
371
        {
372
            var __commandtarget = command_arg1[i];
373
            var __commandscript = command_arg2[i];
374
            with (obj_script_delayed)
375
            {
376
                if (script == __commandscript && target == __commandtarget)
377
                {
378
                    instance_destroy();
379
alarm[0]
380
                    max_time = -300;
381
                }
382
            }
383
        }
384
    }
385
    if (_c == "globalvar")
386
        variable_global_set(command_arg1[i], command_arg2[i]);
387
    if (_c == "autowalk")
388
    {
389
        command_actor[i].auto_facing = command_arg1[i];
390
        command_actor[i].auto_walk = command_arg1[i];
391
    }
392
    if (_c == "autofacing")
393
        command_actor[i].auto_facing = command_arg1[i];
394
    if (_c == "autodepth")
395
        command_actor[i].auto_depth = command_arg1[i];
396
    if (_c == "depth")
397
        command_actor[i].depth = command_arg1[i];
398
    if (_c == "depthobject")
399
        command_actor[i].depth = command_arg1[i].depth + command_arg2[i];
400
    if (_c == "flip")
401
    {
402
        command_actor[i].__flipvalue = command_arg1[i];
403
        with (command_actor[i])
404
            
scr_flip
scr_flip

function
scr_flip(arg0)
{ if (arg0 == "h" || arg0 == "x") { x += ((sprite_get_width(sprite_index) - (sprite_get_xoffset(sprite_index) * 2)) * image_xscale); image_xscale = -image_xscale; } else { y += ((sprite_get_height(sprite_index) - (sprite_get_yoffset(sprite_index) * 2)) * image_yscale); image_yscale = -image_yscale; } }
(__flipvalue);
405
    }
406
    if (_c == "flipinstance")
407
    {
408
        var _flipxy = command_arg2[i];
409
        with (command_arg1[i])
410
            
scr_flip
scr_flip

function
scr_flip(arg0)
{ if (arg0 == "h" || arg0 == "x") { x += ((sprite_get_width(sprite_index) - (sprite_get_xoffset(sprite_index) * 2)) * image_xscale); image_xscale = -image_xscale; } else { y += ((sprite_get_height(sprite_index) - (sprite_get_yoffset(sprite_index) * 2)) * image_yscale); image_yscale = -image_yscale; } }
(_flipxy);
411
    }
412
    if (_c == "facing")
413
    {
414
        if (command_arg1[i] == "l" || command_arg1[i] == "d" || command_arg1[i] == "r" || command_arg1[i] == "u")
415
        {
416
            
scr_actor_facing
scr_actor_facing

function
scr_actor_facing(arg0, arg1)
{ if (arg0.object_index == obj_plat_npc) { if (arg1 == "r") image_xscale = 2; if (arg1 == "l") image_xscale = -2; exit; } __newfacing = arg1; arg0.facing = __newfacing; if (__newfacing == "d") arg0.sprite_index = arg0.dsprite; if (__newfacing == "r") arg0.sprite_index = arg0.rsprite; if (__newfacing == "l") arg0.sprite_index = arg0.lsprite; if (__newfacing == "u") arg0.sprite_index = arg0.usprite; }
(command_actor[i], command_arg1[i]);
417
        }
418
        else
419
        {
420
            command_actor[i]._setfacing = command_arg1[i];
421
            with (command_actor[i])
422
                
scr_set_facing_sprites
scr_set_facing_sprites

function
scr_set_facing_sprites(arg0)
{ _actorname = arg0; name = arg0; if (is_string(_actorname)) { if (_actorname == "kris") { name = "kris"; if (global.darkzone == 0) _actorname = "krislight"; if (global.darkzone == 1) _actorname = "krisdark"; } if (_actorname == "susie") { name = "susie"; if (global.darkzone == 0) { _actorname = "susielight"; if (global.chapter >= 2) _actorname = "susielighteyes"; } if (global.darkzone == 1) { if (global.chapter == 1) _actorname = "susiedark"; if (global.chapter >= 2) _actorname = "susiedarkeyes"; } } if (_actorname == "ralsei") { name = "ralsei"; if (global.chapter <= 1) _actorname = "ralseihat"; if (global.chapter > 1) _actorname = "ralseinohat"; if (global.chapter == 5) { if (
scr_flag_get(1311) == 1)
_actorname = "ralseihat"; } } if (_actorname == "noelle") { name = "noelle"; if (global.darkzone == 0) _actorname = "noellelight"; if (global.darkzone == 1) _actorname = "noelledark"; } if (_actorname == "berdly") { name = "berdly"; if (global.darkzone == 0) _actorname = "berdlylight"; } if (_actorname == "krislight") { usprite = spr_krisu; rsprite = spr_krisr; dsprite = spr_krisd; lsprite = spr_krisl; } if (_actorname == "krislight_balloon") { usprite = spr_krisu_walk_balloon; rsprite = spr_krisr_walk_balloon; dsprite = spr_krisd_walk_balloon; lsprite = spr_krisl_walk_balloon; } if (_actorname == "krisdark") { usprite = spr_krisu_dark; rsprite = spr_krisr_dark; dsprite = spr_krisd_dark; lsprite = spr_krisl_dark; } if (_actorname == "susielight") { usprite = spr_susieu; rsprite = spr_susier; dsprite = spr_susied; lsprite = spr_susiel; } if (_actorname == "susielighteyes") { usprite = spr_susie_walk_up_lw; rsprite = spr_susie_walk_right_lw; dsprite = spr_susie_walk_down_lw; lsprite = spr_susie_walk_left_lw; } if (_actorname == "susiedark") { usprite = spr_susieu_dark; rsprite = spr_susier_dark; dsprite = spr_susied_dark; lsprite = spr_susiel_dark; specialsprite[4] = spr_susie_shock_r; specialsprite[5] = spr_susie_shock; ...
(_setfacing);
423
        }
424
    }
425
    if (_c == "halt")
426
    {
427
        with (command_actor[i])
428
            
scr_halt
scr_halt

function
scr_halt()
{ image_index = 0; image_speed = 0; speed = 0; }
();
429
    }
430
    if (_c == "spin")
431
    {
432
        if (i_ex(command_actor[i]))
433
            command_actor[i].spinspeed = command_arg1[i];
434
    }
435
    if (_c == "stick")
436
    {
437
        if (command_arg1[i] == "on")
438
        {
439
            var _stickobj = command_arg2[i];
440
            var _stickdepth = command_arg3[i];
441
            with (command_actor[i])
442
                
scr_stickto
scr_stickto

function
scr_stickto(arg0, arg1)
{ _stickto = instance_create(0, 0, obj_stickto); _stickto.stickingobj = id; _stickto.stucktoobj = arg0; _stickto.relativedepth = arg1; with (_stickto) event_user(0); }
(_stickobj, _stickdepth);
443
        }
444
        else
445
        {
446
            with (command_actor[i])
447
                
scr_stickto_stop
scr_stickto_stop

function
scr_stickto_stop()
{ if (variable_instance_exists(id, "_stickto")) { with (_stickto) instance_destroy(); } }
();
448
        }
449
    }
450
    if (_c == "sprite")
451
    {
452
        if (command_actor[i].object_index == obj_plat_npc)
453
        {
454
            command_actor[i].set_sprite(command_arg1[i]);
455
            exit;
456
        }
457
        command_actor[i].sprite_index = command_arg1[i];
458
    }
459
    if (_c == "specialsprite")
460
    {
461
        command_actor[i].sprite_index = command_actor[i].specialsprite[command_arg1[i]];
462
        command_actor[i].specialspriteno = command_arg1[i];
463
    }
464
    if (_c == "tenna")
465
    {
466
        if (i_ex(obj_actor_tenna))
467
        {
468
            var targetTenna = obj_actor_tenna;
469
            if (command_actor[i].object_index == obj_actor_tenna)
470
                targetTenna = command_actor[i];
471
            if (command_arg1[i] == "preset")
472
                targetTenna.preset = command_arg2[i];
473
            if (command_arg1[i] == "sprite")
474
            {
475
                targetTenna.bounce = 1;
476
                targetTenna.sprite_index = command_arg2[i];
477
            }
478
        }
479
    }
480
    if (_c == "visible")
481
        command_actor[i].visible = command_arg1[i];
482
    if (_c == "imagespeed")
483
        command_actor[i].image_speed = command_arg1[i];
484
    if (_c == "imageindex")
485
    {
486
        if (command_actor[i].object_index == obj_plat_npc)
487
        {
488
            command_actor[i].set_image_index(command_arg1[i]);
489
            exit;
490
        }
491
        else
492
        {
493
            command_actor[i].image_index = command_arg1[i];
494
        }
495
    }
496
    if (_c == "animate")
497
    {
498
        if (i_ex(command_actor[i]) && !instant)
499
        {
500
            command_actor[i].__arg0 = command_arg1[i];
501
            command_actor[i].__arg1 = command_arg2[i];
502
            command_actor[i].__arg2 = command_arg3[i];
503
            with (command_actor[i])
504
            {
505
                if (__arg0 > 0)
506
                    image_index = __arg0;
507
                
scr_animate
scr_animate

function
scr_animate(arg0, arg1, arg2)
{ __animator = instance_create(x, y, obj_animator); __animator.target = id; __animator.initframe = arg0; __animator.endframe = arg1; __animator.fake_image_speed = arg2; return __animator; }
(__arg0, __arg1, __arg2);
508
            }
509
        }
510
    }
511
    if (_c == "soundplay")
512
    {
513
        if (!instant)
514
        {
515
            var _snd = snd_play(command_arg1[i]);
516
            if (command_arg2[i] != 0)
517
                snd_volume(_snd, command_arg2[i], 0);
518
            if (command_arg2[i] != 0)
519
                snd_pitch(_snd, command_arg3[i]);
520
        }
521
    }
522
    if (_c == "mus" || _c == "music")
523
    {
524
        if (command_arg1[i] == "loop")
525
            mus_loop(global.currentsong[1]);
526
        if (command_arg1[i] == "play")
527
            mus_play(global.currentsong[1]);
528
        if (command_arg1[i] == "stop")
529
            snd_stop(global.currentsong[1]);
530
        if (command_arg1[i] == "free_all")
531
            snd_free_all();
532
        if (command_arg1[i] == "free")
533
            snd_free(global.currentsong[0]);
534
        if (command_arg1[i] == "pause")
535
            snd_pause(global.currentsong[1]);
536
        if (command_arg1[i] == "resume")
537
            snd_resume(global.currentsong[1]);
538
        if (command_arg1[i] == "init")
539
            global.currentsong[0] = snd_init(command_arg2[i]);
540
        if (command_arg1[i] == "initplay")
541
            mus_initplay(command_arg2[i]);
542
        if (command_arg1[i] == "initloop")
543
            mus_initloop(command_arg2[i]);
544
        if (command_arg1[i] == "volume")
545
            mus_volume(global.currentsong[1], command_arg2[i], command_arg3[i]);
546
        if (command_arg1[i] == "pitch")
547
            snd_pitch(global.currentsong[1], command_arg2[i]);
548
        if (command_arg1[i] == "pitchtime")
549
            snd_pitch_time(global.currentsong[1], command_arg2[i], command_arg3[i]);
550
        if (command_arg1[i] == "loopsfx")
551
            mysound = snd_loop(command_arg2[i]);
552
        if (command_arg1[i] == "loopsfxpitch")
553
            snd_pitch(mysound, command_arg2[i]);
554
        if (command_arg1[i] == "loopsfxpitchtime")
555
            snd_pitch_time(mysound, command_arg2[i], command_arg3[i]);
556
        if (command_arg1[i] == "loopsfxstop")
557
            snd_stop(mysound);
558
        if (command_arg1[i] == "loopsfxvolume")
559
            snd_volume(mysound, command_arg2[i], command_arg3[i]);
560
    }
561
    if (_c == "fadeout")
562
    {
563
        if (command_arg1[i] > 0)
564
        {
565
            __fadeouter = 
scr_fadeout
scr_fadeout

function
scr_fadeout(arg0)
{ __fadeouter = instance_create(camerax() - 200, cameray() - 200, obj_fadeout); __fadeouter.fadespeed = 1 / arg0; __fadeouter.depth = 3; return __fadeouter; }
(command_arg1[i]);
566
            if (command_arg2[i] != 0)
567
                __fadeouter.image_blend = command_arg2[i];
568
        }
569
        if (command_arg1[i] < 0)
570
        {
571
            if (instance_exists(obj_fadeout))
572
            {
573
                obj_fadeout.image_alpha = 1;
574
                obj_fadeout.fadespeed = 1 / command_arg1[i];
575
                obj_fadeout.fadein = 1;
576
            }
577
        }
578
    }
579
    if (_c == "panspeed")
580
    {
581
        if (!instant)
582
        {
583
            
scr_pan
scr_pan

function
scr_pan(arg0, arg1, arg2)
{ panner = instance_create(0, 0, obj_panner); panner.panmax = arg2; panner.panx = arg0; panner.pany = arg1; }
(command_arg1[i], command_arg2[i], command_arg3[i]);
584
        }
585
        else
586
        {
587
            camerax_set(camerax() + (command_arg1[i] * command_arg3[i]));
588
            cameray_set(cameray() + (command_arg2[i] * command_arg3[i]));
589
        }
590
    }
591
    if (_c == "pan")
592
    {
593
        if (!instant)
594
        {
595
            
scr_pan_lerp
scr_pan_lerp

function
scr_pan_lerp(arg0, arg1, arg2)
{ panner = instance_create(arg0, arg1, obj_panner); panner.panmax = arg2; panner.type = 1; }
(command_arg1[i], command_arg2[i], command_arg3[i]);
596
        }
597
        else
598
        {
599
            camerax_set(command_arg1[i]);
600
            cameray_set(command_arg2[i]);
601
        }
602
    }
603
    if (_c == "panfancy")
604
    {
605
        with (obj_panfancy)
606
            instance_destroy();
607
        with (instance_create_depth(0, 0, 0, obj_panfancy))
608
        {
609
            camx = other.command_arg1[other.i];
610
            camy = other.command_arg2[other.i];
611
            targtime = other.command_arg3[other.i];
612
            camstruct = other.command_arg4[other.i];
613
        }
614
    }
615
    if (_c == "panobj")
616
    {
617
        
scr_pan_to_obj
scr_pan_to_obj

function
scr_pan_to_obj(arg0, arg1)
{ _panx = arg0.x - floor((__view_get(e__VW.WView, 0) / 2) - ((arg0.sprite_width / 2) - (sprite_get_xoffset(arg0.sprite_index) * arg0.image_xscale))); _pany = arg0.y - floor((__view_get(e__VW.HView, 0) / 2) - ((arg0.sprite_height / 2) - (sprite_get_yoffset(arg0.sprite_index) * arg0.image_yscale))); if (_panx < 0) _panx = 0; if (_panx >= (room_width - __view_get(e__VW.WView, 0))) _panx = room_width - __view_get(e__VW.WView, 0); if (_pany < 0) _pany = 0; if (_pany >= (room_height - __view_get(e__VW.HView, 0))) _pany = room_height - __view_get(e__VW.HView, 0);
scr_pan_lerp(_panx, _pany, arg1);
} enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
(command_arg1[i], command_arg2[i]);
618
        if (instant)
619
        {
620
            with (obj_panner)
621
            {
622
                camerax_set(finalx);
623
                cameray_set(finaly);
624
                instance_destroy();
625
            }
626
        }
627
    }
628
    if (_c == "panfancyobj")
629
    {
630
        with (obj_panfancy)
631
            instance_destroy();
632
        with (instance_create_depth(0, 0, 0, obj_panfancy))
633
        {
634
            var obj = other.command_arg1[other.i];
635
            var ___cam = scr_getcam();
636
            camx = obj.x - floor((___cam.w / 2) - ((obj.sprite_width / 2) - (sprite_get_xoffset(obj.sprite_index) * obj.image_xscale)));
637
            camy = obj.y - floor((___cam.h / 2) - ((obj.sprite_height / 2) - (sprite_get_yoffset(obj.sprite_index) * obj.image_yscale)));
638
            camx = clamp(camx, 0, room_width - ___cam.w);
639
            camy = clamp(camy, 0, room_height - ___cam.h);
640
            targtime = other.command_arg2[other.i];
641
            camstruct = other.command_arg3[other.i];
642
        }
643
    }
644
    if (_c == "pannable")
645
    {
646
        if (instance_exists(obj_mainchara))
647
            obj_mainchara.cutscene = command_arg1[i];
648
        if (instance_exists(obj_plat_camera))
649
            obj_plat_camera.cutscene = command_arg1[i];
650
    }
651
    if (_c == "shake")
652
    {
653
        if (!instant)
654
            instance_create(0, 0, obj_shake);
655
    }
656
    if (_c == "shakex")
657
    {
658
        if (!instant)
659
        {
660
            myshake = instance_create(0, 0, obj_shake);
661
            myshake.shakex = command_arg1[i];
662
            myshake.shakey = command_arg2[i];
663
            myshake.shakespeed = command_arg3[i];
664
        }
665
    }
666
    if (_c == "shakeobj")
667
    {
668
        if (!instant)
669
        {
670
            with (command_actor[i])
671
                
scr_shakeobj
scr_shakeobj

function
scr_shakeobj()
{ var _shakeobj = instance_create(x, y, obj_shakeobj); _shakeobj.target = id; if (argument_count >= 1) { if (i_ex(argument0)) _shakeobj.target = argument0; } if (argument_count >= 2) { if (argument1 != -1) _shakeobj.shakeamt = argument1; } if (argument_count >= 3) { if (argument2 != -1) _shakeobj.shakereduct = argument2; } with (_shakeobj) event_user(0); }
();
672
        }
673
    }
674
    if (_c == "shaketarget")
675
    {
676
        if (!instant)
677
        {
678
            with (command_arg1[i])
679
                
scr_shakeobj
scr_shakeobj

function
scr_shakeobj()
{ var _shakeobj = instance_create(x, y, obj_shakeobj); _shakeobj.target = id; if (argument_count >= 1) { if (i_ex(argument0)) _shakeobj.target = argument0; } if (argument_count >= 2) { if (argument1 != -1) _shakeobj.shakeamt = argument1; } if (argument_count >= 3) { if (argument2 != -1) _shakeobj.shakereduct = argument2; } with (_shakeobj) event_user(0); }
();
680
        }
681
    }
682
    if (_c == "jump")
683
    {
684
        if (i_ex(command_actor[i]))
685
        {
686
            command_actor[i].__arg0 = command_arg1[i];
687
            command_actor[i].__arg1 = command_arg2[i];
688
            command_actor[i].__arg2 = command_arg3[i];
689
            command_actor[i].__arg3 = command_arg4[i];
690
            if (!instant)
691
            {
692
                with (command_actor[i])
693
                    
scr_jump_to_point
scr_jump_to_point

function
scr_jump_to_point(arg0, arg1, arg2, arg3, arg4 = 0)
{ var ___jump =
scr_jump_to_point_sprite(arg0, arg1, arg2, arg3, 0, 0);
with (___jump) { trackalpha = arg4; trackblend = arg4; trackindex = arg4; tracksprite = arg4; trackangle = arg4; } return ___jump; }
(__arg0, __arg1, __arg2, __arg3);
694
            }
695
            else
696
            {
697
                command_actor[i].x = command_arg1[i];
698
                command_actor[i].y = command_arg2[i];
699
            }
700
        }
701
    }
702
    if (_c == "jumpinplace")
703
    {
704
        if (i_ex(command_actor[i]))
705
        {
706
            command_actor[i].__arg0 = command_arg1[i];
707
            command_actor[i].__arg1 = command_arg2[i];
708
            if (!instant)
709
            {
710
                with (command_actor[i])
711
                    
scr_jump_in_place
scr_jump_in_place

function
scr_jump_in_place(arg0, arg1)
{
scr_jump_to_point(x, y, arg0, arg1);
}
(__arg0, __arg1);
712
            }
713
        }
714
    }
715
    if (_c == "jumpsprite")
716
    {
717
        if (i_ex(command_actor[i]))
718
        {
719
            command_actor[i].__arg0 = command_arg1[i];
720
            command_actor[i].__arg1 = command_arg2[i];
721
            command_actor[i].__arg2 = command_arg3[i];
722
            command_actor[i].__arg3 = command_arg4[i];
723
            command_actor[i].__arg4 = command_arg5[i];
724
            command_actor[i].__arg5 = command_arg6[i];
725
            if (!instant)
726
            {
727
                with (command_actor[i])
728
                    
scr_jump_to_point_sprite
scr_jump_to_point_sprite

function
scr_jump_to_point_sprite(arg0, arg1, arg2, arg3, arg4, arg5)
{ __jump_to_point = instance_create(x, y, obj_jump_to_point); __jump_to_point.target = id; with (__jump_to_point) { startx = x; starty = y; endx = arg0; endy = arg1; jumpspeed = arg2; jumptime = arg3; jumpsprite = arg4; landsprite = arg5; if (arg4 > 0) usesprites = 1; drawshadow = 0; } return __jump_to_point; }
(__arg0, __arg1, __arg2, __arg3, __arg4, __arg5);
729
            }
730
            else
731
            {
732
                command_actor[i].x = command_arg1[i];
733
                command_actor[i].y = command_arg2[i];
734
            }
735
        }
736
    }
737
    if (_c == "addxy")
738
    {
739
        command_actor[i].x += command_arg1[i];
740
        command_actor[i].y += command_arg2[i];
741
    }
742
    if (_c == "setxy")
743
    {
744
        command_actor[i].x = command_arg1[i];
745
        command_actor[i].y = command_arg2[i];
746
    }
747
    if (_c == "arg_objectxy")
748
    {
749
        command_arg1[i + 1] = command_arg1[i].x + command_arg2[i];
750
        command_arg2[i + 1] = command_arg1[i].y + command_arg3[i];
751
    }
752
    if (_c == "actortoobject")
753
    {
754
        instance_create(command_actor[i].x, command_actor[i].y, command_arg1[i]);
755
        command_actor[i].visible = 0;
756
    }
757
    if (_c == "actortokris")
758
    {
759
        for (var jjj = 0; jjj < 20; jjj++)
760
        {
761
            if (actor_name[jjj] == "kris" && i_ex(actor_id[jjj]))
762
            {
763
                if (actor_id[jjj].object_index == obj_plat_npc)
764
                {
765
                    obj_plat_player.x = actor_id[jjj].x;
766
                    obj_plat_player.y = actor_id[jjj].y;
767
                    obj_plat_player.visible = 1;
768
                    obj_plat_player.cutscene = 0;
769
                    obj_plat_player.ground = -4;
770
                    with (obj_plat_player)
771
                        scr_match_plat_objects(other.actor_id[jjj], true);
772
                    obj_plat_player.state = 0;
773
                    actor_id[jjj].visible = 0;
774
                }
775
                else
776
                {
777
                    obj_mainchara.x = actor_id[jjj].x;
778
                    obj_mainchara.y = actor_id[jjj].y;
779
                    obj_mainchara.visible = 1;
780
                    actor_id[jjj].visible = 0;
781
                    if (actor_id[jjj].facing == "d")
782
                        global.facing = 0;
783
                    if (actor_id[jjj].facing == "r")
784
                        global.facing = 1;
785
                    if (actor_id[jjj].facing == "u")
786
                        global.facing = 2;
787
                    if (actor_id[jjj].facing == "l")
788
                        global.facing = 3;
789
                    obj_mainchara.set_facing();
790
                }
791
            }
792
        }
793
    }
794
    if (_c == "actortocaterpillar")
795
    {
796
        _caterpillar_moved = 0;
797
        if (i_ex(obj_plat_player))
798
        {
799
            for (var jjj = 0; jjj < array_length(actor_id); jjj++)
800
            {
801
                if (i_ex(actor_id[jjj]) && actor_id[jjj].object_index == obj_plat_npc)
802
                {
803
                    var cp = -4;
804
                    with (obj_plat_follower)
805
                    {
806
                        if (name == other.actor_name[jjj])
807
                        {
808
                            cp = self;
809
                            break;
810
                        }
811
                    }
812
                    if (cp != -4)
813
                    {
814
                        cp.x = actor_id[jjj].x;
815
                        cp.y = actor_id[jjj].y;
816
                        cp.visible = 1;
817
                        cp.caterpillarmode = 0;
818
                        cp.offscreen_despawn_cooldown = 50;
819
                        cp.image_alpha = image_alpha;
820
                        with (cp)
821
                        {
822
                            caterpillarmode = false;
823
                            scr_match_plat_objects(other.actor_id[jjj]);
824
                            restore_default_behavior();
825
                        }
826
                        actor_id[jjj].visible = 0;
827
                    }
828
                }
829
            }
830
            exit;
831
        }
832
        for (var lll = 0; lll < 2; lll++)
833
        {
834
            if (i_ex(global.cinstance[lll]))
835
            {
836
                for (var jjj = 0; jjj < 20; jjj++)
837
                {
838
                    if (actor_name[jjj] == global.cinstance[lll].name && i_ex(actor_id[jjj]))
839
                    {
840
                        if (global.cinstance[lll].x != actor_id[jjj].x)
841
                        {
842
                            global.cinstance[lll].x = actor_id[jjj].x;
843
                            _caterpillar_moved = 1;
844
                        }
845
                        if (global.cinstance[lll].y != actor_id[jjj].y)
846
                        {
847
                            global.cinstance[lll].y = actor_id[jjj].y;
848
                            _caterpillar_moved = 1;
849
                        }
850
                        
scr_caterpillar_facing_single
scr_caterpillar_facing_single

function
scr_caterpillar_facing_single(arg0, arg1)
{ with (obj_caterpillarchara) { if (name == arg0) { for (i = 0; i < 25; i += 1) facing[i] =
scr_facing_letter_to_number(arg1);
} } }
(actor_name[jjj], actor_id[jjj].facing);
851
                        global.cinstance[lll].visible = 1;
852
                        actor_id[jjj].visible = 0;
853
                    }
854
                }
855
            }
856
        }
857
        if (_caterpillar_moved == 1)
858
        {
859
            with (obj_caterpillarchara)
860
                
scr_caterpillar_interpolate
scr_caterpillar_interpolate

function
scr_caterpillar_interpolate(arg0 = "none")
{ if (arg0 == "all") { with (obj_caterpillarchara) scr_caterpillar_interpolate_old(); } else if (arg0 == "none") { if (object_index == obj_caterpillarchara) scr_caterpillar_interpolate_old(); } else { with (obj_caterpillarchara) { if (name == arg0) scr_caterpillar_interpolate_old(); } } } function scr_caterinterp(arg0 = "none") {
scr_caterpillar_interpolate(arg0);
} function scr_caterpillar_interpolate_old() { var _newfacing = direction_to_object_bbox(id, 1198, true); remx[0] = obj_mainchara.x; remy[0] = obj_mainchara.y; facing[0] = _newfacing; for (var _iaia = target; _iaia > 0; _iaia -= 1) { remx[_iaia] = lerp(obj_mainchara.x, x + halign, _iaia / target); remy[_iaia] = lerp(obj_mainchara.y, y + valign, _iaia / target); facing[_iaia] = _newfacing; } }
();
861
        }
862
    }
863
    if (_c == "actortoparty")
864
        c_actortoparty_function();
865
    if (_c == "actortocaterpillarstill")
866
    {
867
        _caterpillar_moved = 0;
868
        for (var lll = 0; lll < 2; lll++)
869
        {
870
            if (i_ex(global.cinstance[lll]))
871
            {
872
                for (var jjj = 0; jjj < 20; jjj++)
873
                {
874
                    if (actor_name[jjj] == global.cinstance[lll].name && i_ex(actor_id[jjj]))
875
                    {
876
                        var myactor = actor_id[jjj];
877
                        with (obj_caterpillarchara)
878
                        {
879
                            if (name == myactor.name)
880
                            {
881
                                setxy(myactor.x, myactor.y);
882
                                
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
883
                                
scr_caterpillar_interpolate
scr_caterpillar_interpolate

function
scr_caterpillar_interpolate(arg0 = "none")
{ if (arg0 == "all") { with (obj_caterpillarchara) scr_caterpillar_interpolate_old(); } else if (arg0 == "none") { if (object_index == obj_caterpillarchara) scr_caterpillar_interpolate_old(); } else { with (obj_caterpillarchara) { if (name == arg0) scr_caterpillar_interpolate_old(); } } } function scr_caterinterp(arg0 = "none") {
scr_caterpillar_interpolate(arg0);
} function scr_caterpillar_interpolate_old() { var _newfacing = direction_to_object_bbox(id, 1198, true); remx[0] = obj_mainchara.x; remy[0] = obj_mainchara.y; facing[0] = _newfacing; for (var _iaia = target; _iaia > 0; _iaia -= 1) { remx[_iaia] = lerp(obj_mainchara.x, x + halign, _iaia / target); remy[_iaia] = lerp(obj_mainchara.y, y + valign, _iaia / target); facing[_iaia] = _newfacing; } }
(name);
884
                                
scr_caterpillar_facing_single
scr_caterpillar_facing_single

function
scr_caterpillar_facing_single(arg0, arg1)
{ with (obj_caterpillarchara) { if (name == arg0) { for (i = 0; i < 25; i += 1) facing[i] =
scr_facing_letter_to_number(arg1);
} } }
(name, myactor.facing);
885
                            }
886
                        }
887
                        global.cinstance[lll].visible = 1;
888
                        actor_id[jjj].visible = 0;
889
                    }
890
                }
891
            }
892
        }
893
    }
894
    if (_c == "saveload")
895
    {
896
        if (command_arg1[i] == "save")
897
            
scr_cutscene_savestate
scr_cutscene_savestate

function
scr_cutscene_savestate()
{
scr_debug_print("Cutscene Saved");
masterArray = variable_instance_get_names(id); for (var i = 0; i < array_length_1d(masterArray); i++) myVar[i] = variable_instance_get(id, masterArray[i]); remCameraX = camerax(); remCameraY = cameray(); for (var i = 0; i < 20; i++) { actorSaved[i] = 0; if (i_ex(actor_id[i])) { actorSaved[i] = 1; with (actor_id[i])
scr_instance_save_local_vars();
} } for (var i = 0; i < 10; i++) { objectSaved[i] = 0; if (i_ex(save_object[i])) { objectSaved[i] = 1; with (save_object[i])
scr_instance_save_local_vars();
} } scr_cutscene_save_music(); }
();
898
        if (command_arg1[i] == "load")
899
            
scr_cutscene_loadstate
scr_cutscene_loadstate

function
scr_cutscene_loadstate()
{
scr_debug_print("Cutscene Loaded");
for (var i = 0; i < 20; i++) { if (i_ex(actor_id[i])) { if (actorSaved[i] == 1) { with (actor_id[i])
scr_instance_load_local_vars();
} } } for (var i = 0; i < 10; i++) { if (i_ex(save_object[i])) { if (objectSaved[i] == 1) { with (save_object[i])
scr_instance_load_local_vars();
} } } for (var i = 0; i < array_length_1d(masterArray); i++) variable_instance_set(id, masterArray[i], myVar[i]); camerax_set(remCameraX); cameray_set(remCameraY); with (obj_panner) instance_destroy(); with (obj_move_actor) instance_destroy(); with (obj_move_to_point) instance_destroy(); with (obj_shakeobj) instance_destroy(); with (obj_shake) instance_destroy(); with (obj_dialoguer) instance_destroy(); with (obj_writer) instance_destroy(); with (obj_face) instance_destroy(); with (obj_cutscene_delaycmd) instance_destroy(); with (obj_jump_to_point) instance_destroy(); with (obj_stickto) instance_destroy(); with (obj_lerpvar) instance_destroy(); scr_cutscene_load_music(); loadedState = 1; waiting = 0;
scr_cutscene_master_commands_initialize();
}
();
900
    }
901
    if (_c == "select")
902
    {
903
        actor_selected = actor_name[command_arg1[i]];
904
        actor_selected_id = actor_id[command_arg1[i]];
905
    }
906
    if (_c == "waitcustom")
907
    {
908
        with (master_object)
909
            customcon = 1;
910
        cs_wait_custom = 1;
911
        waiting = 1;
912
        breakme = 1;
913
    }
914
    if (_c == "waitdialoguer")
915
    {
916
        if (!instant)
917
        {
918
            waiting = 1;
919
            cs_wait_dialogue = 1;
920
            breakme = 1;
921
        }
922
    }
923
    if (_c == "waitbox")
924
    {
925
        if (!instant)
926
        {
927
            waiting = 1;
928
            cs_wait_box = command_arg1[i];
929
            breakme = 1;
930
        }
931
    }
932
    if (_c == "waitboxend")
933
    {
934
        if (!instant)
935
        {
936
            waiting = 1;
937
            cs_wait_box = command_arg1[i];
938
            cs_wait_box_end = true;
939
            breakme = 1;
940
        }
941
    }
942
    if (_c == "waitif")
943
    {
944
        cs_wait_if = 1;
945
        cs_wait_if_objectid = command_arg1[i];
946
        cs_wait_if_varname = command_arg2[i];
947
        cs_wait_if_operator = command_arg3[i];
948
        cs_wait_if_varvalue = command_arg4[i];
949
        waiting = 1;
950
        breakme = 1;
951
    }
952
    if (_c == "wait")
953
    {
954
        cs_wait_amount = command_arg1[i];
955
        if (instant)
956
            cs_wait_amount = 1;
957
        cs_wait_timer = 0;
958
        waiting = 1;
959
        breakme = 1;
960
    }
961
    if (_c == "terminate")
962
    {
963
        terminate_this_frame = 1;
964
        breakme = 1;
965
    }
966
    if (_c == "terminatekillactors")
967
    {
968
        kill_actors = 1;
969
        terminate_this_frame = 1;
970
        breakme = 1;
971
    }
972
    if (_c == "customfunc")
973
    {
974
        if (object_index == obj_cutscene_delaycmd || object_index == obj_cutscene_messagecmd)
975
        {
976
            if (command_arg1[i] != -1)
977
                command_arg2[i](command_arg1[i]);
978
            else
979
                command_arg2[i]();
980
        }
981
        else if (array_length(customfuncs) > 0)
982
        {
983
            if (command_arg1[i] != -1)
984
                customfuncs[0](command_arg1[i]);
985
            else
986
                customfuncs[0]();
987
            array_delete(customfuncs, 0, 1);
988
        }
989
    }
990
    if (_c == "stepfunc")
991
        command_actor[i].step_func = method(command_actor[i], command_arg1[i]);
992
    if (_c == "drawfunc")
993
        command_actor[i].draw_func = method(command_actor[i], command_arg1[i]);
994
    if (_c == "plat_action")
995
        command_arg1[i].custom_behaviour(command_arg2[i]);
996
    if (_c == "plat_stop_action")
997
        command_arg1[i].restore_default_behavior();
998
    if (_c == "plat_animate")
999
        command_arg1[i].force_animation(command_arg2[i], command_arg3[i]);
1000
    if (_c == "plat_stop_animation")
1001
        command_arg1[i].restore_animation();
1002
    if (_c == "plat_moveto")
1003
    {
1004
        command_arg1[i].state = 1;
1005
        command_arg1[i].followtarget = command_arg2[i];
1006
        command_arg1[i].followxoffset = command_arg3[i];
1007
        command_arg1[i].reach_timeout_timer = 0;
1008
        command_arg1[i].autostop_when_reached = true;
1009
    }
1010
    if (_c == "plat_goal_reached")
1011
    {
1012
        command_arg1[i].reach_timeout_timer = command_arg2[i];
1013
        cs_wait_if = 1;
1014
        cs_wait_if_objectid = command_arg1[i];
1015
        cs_wait_if_varname = "reachedtarget";
1016
        cs_wait_if_operator = "=";
1017
        cs_wait_if_varvalue = "1";
1018
        waiting = 1;
1019
        breakme = 1;
1020
    }
1021
    if (_c == "plat_prepare_followers")
1022
    {
1023
        with (obj_plat_follower)
1024
        {
1025
            restore_default_behavior();
1026
            restore_animation();
1027
            state = 1;
1028
            caterpillarmode = false;
1029
            followtarget = "__nothing";
1030
        }
1031
    }
1032
    if (_c == "plat_followers_to_caterpillar")
1033
    {
1034
        with (obj_plat_follower)
1035
            restore_default_behavior(false);
1036
    }
1037
    if (_c == "plat_turn")
1038
        command_arg1[i].turn(command_arg2[i]);
1039
    if (_c == "debugprint")
1040
    {
1041
        if (
scr_debug
scr_debug

function
scr_debug()
{ return global.debug == 1; }
())
1042
            
scr_debug_print
scr_debug_print

function
scr_debug_print()
{ if (!
scr_debug())
exit; } function scr_debug_clear_all() { }
(command_arg1[i]);
1043
    }
1044
    if (_c == "animcomplex")
1045
        
scr_animate_complex
scr_animate_complex

function
scr_animate_complex(arg0, arg1, arg2, arg3, arg4 = 0)
{ if (arg4 == "frames") arg4 = 0; if (arg4 == "seconds") arg4 = 1; var _frames_to_complete = 0; for (var i = 0; i < array_length(arg3); i++) { if (arg4 == 1) arg3[i] = round(arg3[i] * 30); show_debug_message_concat("scr_animate_complex: ", _frames_to_complete, " frames to complete frame: ", arg3[i]); _frames_to_complete += arg3[i]; } show_debug_message_concat("scr_animate_complex: ", _frames_to_complete, " frames to complete animation: ", sprite_get_name(arg1)); with (instance_create_depth(0, 0, 0, obj_animator_complex)) { target = arg0; return_sprite = arg0.sprite_index; sprite = arg1; target.sprite_index = arg1; start_frame = arg2; target.image_index = arg2; timings_array = arg3; } return _frames_to_complete; } function c_animate_complex(arg0, arg1, arg2, arg3, arg4 = 0) { if (arg4 == "frames") arg4 = 0; if (arg4 == "seconds") arg4 = 1; var _frames_to_complete = 0; for (var i = 0; i < array_length(arg3); i++) { if (arg4 == 1) arg3[i] = round(arg3[i] * 30); _frames_to_complete += arg3[i]; }
c_cmd_x("animcomplex", arg0, arg1, arg2, arg3, 0, 0);
return _frames_to_complete; }
(command_arg1[i], command_arg2[i], command_arg3[i], command_arg4[i], 0);
1046
    if (_c == "setfunc")
1047
        variable_instance_set(command_arg1[i], command_arg2[i], method(command_arg4[i], command_arg3[i]));
1048
}