Deltarune (Chapter 3) 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 == "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 = 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) { cs_wait_amount = ceil(__walktime); if (instant) cs_wait_amount = 1; cs_wait_timer = 0; waiting = 1; breakme = 1; } } } else { command_actor[i].x = command_arg1[i]; command_actor[i].y = command_arg2[i]; } ...
()
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 == "walk")
23
    {
24
        if (!instant)
25
        {
26
            actor_move = instance_create(0, 0, obj_move_actor);
27
            actor_move.target = command_actor[i];
28
            actor_move.direction_word = command_arg1[i];
29
            actor_move.speed = command_arg2[i];
30
            actor_move.time = command_arg3[i];
31
            with (actor_move)
32
                event_user(8);
33
        }
34
        else
35
        {
36
            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);
37
            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);
38
        }
39
    }
40
    if (_c == "walkto")
41
    {
42
        var _object = command_arg1[i];
43
        var _tx = _object.x + command_arg2[i];
44
        var _ty = _object.y + command_arg3[i];
45
        if (command_arg5[i] == true && command_arg6[i] == true)
46
        {
47
            var _yyoff1 = command_actor[i].sprite_height - command_actor[i].sprite_yoffset;
48
            var _yyoff2 = _object.sprite_height - _object.sprite_yoffset;
49
            var _xxoff1 = (command_actor[i].sprite_width / 2) - command_actor[i].sprite_xoffset;
50
            var _xxoff2 = (_object.sprite_width / 2) - _object.sprite_xoffset;
51
            _ty += (_yyoff2 - _yyoff1);
52
            _tx += (_xxoff1 - _xxoff2);
53
        }
54
        else if (command_arg5[i] == true && command_arg6[i] == false)
55
        {
56
            _tx -= ((command_actor[i].sprite_width / 2) - command_actor[i].sprite_xoffset);
57
            _ty -= (command_actor[i].sprite_height - command_actor[i].sprite_yoffset);
58
        }
59
        command_arg1[i] = _tx;
60
        command_arg2[i] = _ty;
61
        command_arg3[i] = command_arg4[i];
62
        _c = "walkdirect";
63
    }
64
    if (_c == "walkdirect")
65
    {
66
        if (!instant)
67
        {
68
            actor_move = instance_create(0, 0, obj_move_to_point);
69
            actor_move.target = command_actor[i];
70
            actor_move.movex = command_arg1[i];
71
            actor_move.movey = command_arg2[i];
72
            if (command_arg1[i] == 0)
73
                actor_move.movex = command_actor[i].x;
74
            if (command_arg2[i] == 0)
75
                actor_move.movey = command_actor[i].y;
76
            if (command_arg3[i] >= 0)
77
            {
78
                actor_move.movemax = command_arg3[i];
79
            }
80
            else
81
            {
82
                var __walktime = point_distance(command_actor[i].x, command_actor[i].y, command_arg1[i], command_arg2[i]) / -command_arg3[i];
83
                if (__walktime < 1)
84
                    __walktime = 1;
85
                actor_move.movemax = __walktime;
86
                if (command_arg4[i] == 1)
87
                {
88
                    cs_wait_amount = ceil(__walktime);
89
                    if (instant)
90
                        cs_wait_amount = 1;
91
                    cs_wait_timer = 0;
92
                    waiting = 1;
93
                    breakme = 1;
94
                }
95
            }
96
        }
97
        else
98
        {
99
            command_actor[i].x = command_arg1[i];
100
            command_actor[i].y = command_arg2[i];
101
        }
102
    }
103
    if (_c == "msgset")
104
        msgset(command_arg1[i], command_arg2[i]);
105
    if (_c == "msgnext")
106
        msgnext(command_arg1[i]);
107
    if (_c == "talk")
108
    {
109
        if (!instant)
110
        {
111
            mydialoguer = instance_create(0, 0, obj_dialoguer);
112
            if (msgside >= 0)
113
                mydialoguer.side = msgside;
114
            mydialoguer.zurasu = zurasu;
115
        }
116
    }
117
    if (_c == "msgface")
118
        
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 == "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 == "tenna") msgsetsub(arg1, "\\TX \\F0 \\E~1 \\Tv %", string(_emotion)); if (_speaker == "lanino") { msgsetsub(arg1, "\\TX \\F0 \\E~1 \\Tp %", string(_emotion)); global.fc = 23; global.typer = 50; } if (_speaker == "elnina") { global.fc = 24; msgsetsub(arg1, "\\TX \\F0 \\E~1 \\Tp %", string(_emotion)); global.typer = 50; } }
(command_arg1[i], command_arg2[i], command_arg3[i]);
119
    if (_c == "msgfacenext")
120
        
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]);
121
    if (_c == "msgside")
122
    {
123
        if (command_arg1[i] == "any")
124
            msgside = -1;
125
        if (command_arg1[i] == "top")
126
            msgside = 0;
127
        if (command_arg1[i] == "bottom")
128
            msgside = 1;
129
        if (command_arg1[i] == "zurasuon")
130
            zurasu = 1;
131
        if (command_arg1[i] == "zurasuoff")
132
            zurasu = 0;
133
    }
134
    if (_c == "emote")
135
    {
136
        if (!instant)
137
        {
138
            command_actor[i].__arg0 = command_arg1[i];
139
            command_actor[i].__arg1 = command_arg2[i];
140
            command_actor[i].__arg2 = command_arg3[i];
141
            command_actor[i].__arg3 = command_arg4[i];
142
            if (command_arg3[i] == 0)
143
            {
144
                with (command_actor[i])
145
                    
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);
146
            }
147
            else
148
            {
149
                with (command_actor[i])
150
                    
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);
151
            }
152
        }
153
    }
154
    if (_c == "speaker")
155
        
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 == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } 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; ...
(command_arg1[i]);
156
    if (_c == "fe")
157
    {
158
        global.fe = command_arg1[i];
159
        if (command_arg2[i] != -2)
160
            global.fc = command_arg2[i];
161
    }
162
    if (_c == "msc")
163
    {
164
        global.msc = command_arg1[i];
165
        
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);
166
    }
167
    if (_c == "instancecreate")
168
    {
169
        _instance = instance_create(command_arg1[i], command_arg2[i], command_arg3[i]);
170
        if (i_ex(master_object))
171
            master_object.cutscene_instance = _instance;
172
    }
173
    if (_c == "varadd")
174
    {
175
        __chosenid = 0;
176
        if (command_arg1[i] == 0)
177
            __chosenid = command_actor[i];
178
        else
179
            __chosenid = command_arg1[i];
180
        var _varstart = variable_instance_get(__chosenid, command_arg2[i]);
181
        if (command_arg5[i] == 0)
182
        {
183
            command_arg3[i] = _varstart + command_arg3[i];
184
        }
185
        else
186
        {
187
            command_arg3[i] += _varstart;
188
            command_arg4[i] += _varstart;
189
        }
190
        _c = "var";
191
    }
192
    if (_c == "varto")
193
    {
194
        __chosenid = 0;
195
        if (command_arg1[i] == 0)
196
            __chosenid = command_actor[i];
197
        else
198
            __chosenid = command_arg1[i];
199
        command_arg3[i] = variable_instance_get(__chosenid, command_arg2[i]);
200
        _c = "var";
201
    }
202
    if (_c == "var")
203
    {
204
        if (instant)
205
        {
206
            if (command_arg5[i] != 0)
207
            {
208
                command_arg3[i] = command_arg4[i];
209
                command_arg5[i] = 0;
210
            }
211
        }
212
        __chosenid = 0;
213
        if (command_arg1[i] == 0)
214
            __chosenid = command_actor[i];
215
        else
216
            __chosenid = command_arg1[i];
217
        if (command_arg5[i] == 0)
218
        {
219
            variable_instance_set(__chosenid, command_arg2[i], command_arg3[i]);
220
        }
221
        else if (command_arg6[i] == 0)
222
        {
223
            
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_lerp_var_instance() { if (argument_count >= 6)
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4);
} function scr_lerp_instance_var() { if (argument_count >= 6)
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4);
}
(__chosenid, command_arg2[i], command_arg3[i], command_arg4[i], command_arg5[i]);
224
        }
225
        else if (!is_string(command_arg6[i]))
226
        {
227
            
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_lerp_var_instance() { if (argument_count >= 6)
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4);
} function scr_lerp_instance_var() { if (argument_count >= 6)
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
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");
228
        }
229
        else
230
        {
231
            var __easetype = real(string_digits(command_arg6[i]));
232
            if (string_char_at(command_arg6[i], 1) == "-")
233
            {
234
                __easetype *= -1;
235
                command_arg6[i] = string_delete(command_arg6[i], 1, 1);
236
            }
237
            command_arg6[i] = string_delete(command_arg6[i], 1, 1);
238
            
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_lerp_var_instance() { if (argument_count >= 6)
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4);
} function scr_lerp_instance_var() { if (argument_count >= 6)
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
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]);
239
        }
240
    }
241
    if (_c == "script")
242
    {
243
        if (command_arg3[i] != -10)
244
        {
245
            var __sarg1 = command_arg2[i];
246
            var __sarg2 = command_arg3[i];
247
            var __sarg3 = command_arg4[i];
248
            var __sarg4 = command_arg5[i];
249
            var __sarg5 = command_arg6[i];
250
            var __sarg_counted = 3;
251
            if (command_arg4[i] == -3.14)
252
                __sarg_counted--;
253
            if (command_arg5[i] == -3.14)
254
                __sarg_counted--;
255
            if (command_arg6[i] == -3.14)
256
                __sarg_counted--;
257
            if (command_arg3[i] == 0)
258
            {
259
                if (__sarg_counted == 0)
260
                {
261
                    with (command_arg1[i])
262
                        script_execute(__sarg1);
263
                }
264
                if (__sarg_counted == 1)
265
                {
266
                    with (command_arg1[i])
267
                        script_execute(__sarg1, __sarg3);
268
                }
269
                if (__sarg_counted == 2)
270
                {
271
                    with (command_arg1[i])
272
                        script_execute(__sarg1, __sarg3, __sarg4);
273
                }
274
                if (__sarg_counted == 3)
275
                {
276
                    with (command_arg1[i])
277
                        script_execute(__sarg1, __sarg3, __sarg4, __sarg5);
278
                }
279
            }
280
            else
281
            {
282
                if (__sarg_counted == 0)
283
                {
284
                    with (command_arg1[i])
285
                        
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);
286
                }
287
                if (__sarg_counted == 1)
288
                {
289
                    with (command_arg1[i])
290
                        
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);
291
                }
292
                if (__sarg_counted == 2)
293
                {
294
                    with (command_arg1[i])
295
                        
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);
296
                }
297
                if (__sarg_counted == 3)
298
                {
299
                    with (command_arg1[i])
300
                        
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);
301
                }
302
            }
303
        }
304
        else
305
        {
306
            var __commandtarget = command_arg1[i];
307
            var __commandscript = command_arg2[i];
308
            with (obj_script_delayed)
309
            {
310
                if (script == __commandscript && target == __commandtarget)
311
                {
312
                    instance_destroy();
313
alarm[0]
314
                    max_time = -300;
315
                }
316
            }
317
        }
318
    }
319
    if (_c == "globalvar")
320
        variable_global_set(command_arg1[i], command_arg2[i]);
321
    if (_c == "autowalk")
322
    {
323
        command_actor[i].auto_facing = command_arg1[i];
324
        command_actor[i].auto_walk = command_arg1[i];
325
    }
326
    if (_c == "autofacing")
327
        command_actor[i].auto_facing = command_arg1[i];
328
    if (_c == "autodepth")
329
        command_actor[i].auto_depth = command_arg1[i];
330
    if (_c == "depth")
331
        command_actor[i].depth = command_arg1[i];
332
    if (_c == "depthobject")
333
        command_actor[i].depth = command_arg1[i].depth + command_arg2[i];
334
    if (_c == "flip")
335
    {
336
        command_actor[i].__flipvalue = command_arg1[i];
337
        with (command_actor[i])
338
            
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);
339
    }
340
    if (_c == "facing")
341
    {
342
        if (command_arg1[i] == "l" || command_arg1[i] == "d" || command_arg1[i] == "r" || command_arg1[i] == "u")
343
        {
344
            
scr_actor_facing
scr_actor_facing

function
scr_actor_facing(arg0, arg1)
{ __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]);
345
        }
346
        else
347
        {
348
            command_actor[i]._setfacing = command_arg1[i];
349
            with (command_actor[i])
350
                
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 (_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 (global.darkzone == 1) _actorname = "berdlydark"; } if (_actorname == "krislight") { usprite = spr_krisu; rsprite = spr_krisr; dsprite = spr_krisd; lsprite = spr_krisl; } if (_actorname == "krisdark") { usprite = spr_krisu_dark; rsprite = spr_krisr_dark; dsprite = spr_krisd_dark; lsprite = spr_krisl_dark; if (global.chapter == 3) { if (
scr_flag_get(1076) == 1 || 
scr_flag_get(1077) == 1)
usprite = spr_krisu_dark_cool; } } 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; } if (_actorname == "susiedarkeyes") { usprite = spr_susie_walk_up_dw; rsprite = spr_susie_walk_right_dw; ...
(_setfacing);
351
        }
352
    }
353
    if (_c == "halt")
354
    {
355
        with (command_actor[i])
356
            
scr_halt
scr_halt

function
scr_halt()
{ image_index = 0; image_speed = 0; speed = 0; }
();
357
    }
358
    if (_c == "spin")
359
    {
360
        if (i_ex(command_actor[i]))
361
            command_actor[i].spinspeed = command_arg1[i];
362
    }
363
    if (_c == "stick")
364
    {
365
        if (command_arg1[i] == "on")
366
        {
367
            var _stickobj = command_arg2[i];
368
            var _stickdepth = command_arg3[i];
369
            with (command_actor[i])
370
                
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);
371
        }
372
        else
373
        {
374
            with (command_actor[i])
375
                
scr_stickto_stop
scr_stickto_stop

function
scr_stickto_stop()
{ if (variable_instance_exists(id, "_stickto")) { with (_stickto) instance_destroy(); } }
();
376
        }
377
    }
378
    if (_c == "sprite")
379
        command_actor[i].sprite_index = command_arg1[i];
380
    if (_c == "specialsprite")
381
    {
382
        command_actor[i].sprite_index = command_actor[i].specialsprite[command_arg1[i]];
383
        command_actor[i].specialspriteno = command_arg1[i];
384
    }
385
    if (_c == "tenna")
386
    {
387
        if (i_ex(obj_actor_tenna))
388
        {
389
            var targetTenna = obj_actor_tenna;
390
            if (command_actor[i].object_index == obj_actor_tenna)
391
                targetTenna = command_actor[i];
392
            if (command_arg1[i] == "preset")
393
                targetTenna.preset = command_arg2[i];
394
            if (command_arg1[i] == "sprite")
395
            {
396
                targetTenna.bounce = 1;
397
                targetTenna.sprite_index = command_arg2[i];
398
            }
399
        }
400
    }
401
    if (_c == "visible")
402
        command_actor[i].visible = command_arg1[i];
403
    if (_c == "imagespeed")
404
        command_actor[i].image_speed = command_arg1[i];
405
    if (_c == "imageindex")
406
        command_actor[i].image_index = command_arg1[i];
407
    if (_c == "animate")
408
    {
409
        if (i_ex(command_actor[i]) && !instant)
410
        {
411
            command_actor[i].__arg0 = command_arg1[i];
412
            command_actor[i].__arg1 = command_arg2[i];
413
            command_actor[i].__arg2 = command_arg3[i];
414
            with (command_actor[i])
415
                
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);
416
        }
417
    }
418
    if (_c == "soundplay")
419
    {
420
        if (!instant)
421
        {
422
            var _snd = snd_play(command_arg1[i]);
423
            if (command_arg2[i] != 0)
424
                snd_volume(_snd, command_arg2[i], 0);
425
            if (command_arg2[i] != 0)
426
                snd_pitch(_snd, command_arg3[i]);
427
        }
428
    }
429
    if (_c == "mus" || _c == "music")
430
    {
431
        if (command_arg1[i] == "loop")
432
            mus_loop(global.currentsong[1]);
433
        if (command_arg1[i] == "play")
434
            mus_play(global.currentsong[1]);
435
        if (command_arg1[i] == "stop")
436
            snd_stop(global.currentsong[1]);
437
        if (command_arg1[i] == "free_all")
438
            snd_free_all();
439
        if (command_arg1[i] == "free")
440
            snd_free(global.currentsong[0]);
441
        if (command_arg1[i] == "pause")
442
            snd_pause(global.currentsong[1]);
443
        if (command_arg1[i] == "resume")
444
            snd_resume(global.currentsong[1]);
445
        if (command_arg1[i] == "init")
446
            global.currentsong[0] = snd_init(command_arg2[i]);
447
        if (command_arg1[i] == "initplay")
448
            mus_initplay(command_arg2[i]);
449
        if (command_arg1[i] == "initloop")
450
            mus_initloop(command_arg2[i]);
451
        if (command_arg1[i] == "volume")
452
            mus_volume(global.currentsong[1], command_arg2[i], command_arg3[i]);
453
        if (command_arg1[i] == "pitch")
454
            snd_pitch(global.currentsong[1], command_arg2[i]);
455
        if (command_arg1[i] == "pitchtime")
456
            snd_pitch_time(global.currentsong[1], command_arg2[i], command_arg3[i]);
457
        if (command_arg1[i] == "loopsfx")
458
            mysound = snd_loop(command_arg2[i]);
459
        if (command_arg1[i] == "loopsfxpitch")
460
            snd_pitch(mysound, command_arg2[i]);
461
        if (command_arg1[i] == "loopsfxpitchtime")
462
            snd_pitch_time(mysound, command_arg2[i], command_arg3[i]);
463
        if (command_arg1[i] == "loopsfxstop")
464
            snd_stop(mysound);
465
        if (command_arg1[i] == "loopsfxvolume")
466
            snd_volume(mysound, command_arg2[i], command_arg3[i]);
467
    }
468
    if (_c == "fadeout")
469
    {
470
        if (command_arg1[i] > 0)
471
        {
472
            __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]);
473
            if (command_arg2[i] != 0)
474
                __fadeouter.image_blend = command_arg2[i];
475
        }
476
        if (command_arg1[i] < 0)
477
        {
478
            if (instance_exists(obj_fadeout))
479
            {
480
                obj_fadeout.image_alpha = 1;
481
                obj_fadeout.fadespeed = 1 / command_arg1[i];
482
                obj_fadeout.fadein = 1;
483
            }
484
        }
485
    }
486
    if (_c == "panspeed")
487
    {
488
        if (!instant)
489
        {
490
            
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]);
491
        }
492
        else
493
        {
494
            camerax_set(camerax() + (command_arg1[i] * command_arg3[i]));
495
            cameray_set(cameray() + (command_arg2[i] * command_arg3[i]));
496
        }
497
    }
498
    if (_c == "pan")
499
    {
500
        if (!instant)
501
        {
502
            
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]);
503
        }
504
        else
505
        {
506
            camerax_set(command_arg1[i]);
507
            cameray_set(command_arg2[i]);
508
        }
509
    }
510
    if (_c == "panobj")
511
    {
512
        
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)); _pany = arg0.y - floor((__view_get(e__VW.HView, 0) / 2) - (arg0.sprite_height / 2)); 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]);
513
        if (instant)
514
        {
515
            with (obj_panner)
516
            {
517
                camerax_set(finalx);
518
                cameray_set(finaly);
519
                instance_destroy();
520
            }
521
        }
522
    }
523
    if (_c == "pannable")
524
    {
525
        if (instance_exists(obj_mainchara))
526
            obj_mainchara.cutscene = command_arg1[i];
527
    }
528
    if (_c == "shake")
529
    {
530
        if (!instant)
531
            instance_create(0, 0, obj_shake);
532
    }
533
    if (_c == "shakex")
534
    {
535
        if (!instant)
536
        {
537
            myshake = instance_create(0, 0, obj_shake);
538
            myshake.shakex = command_arg1[i];
539
            myshake.shakey = command_arg2[i];
540
            myshake.shakespeed = command_arg3[i];
541
        }
542
    }
543
    if (_c == "shakeobj")
544
    {
545
        if (!instant)
546
        {
547
            with (command_actor[i])
548
                
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); }
();
549
        }
550
    }
551
    if (_c == "shakeobj_instance")
552
    {
553
        if (!instant)
554
        {
555
            with (command_arg1[i])
556
                
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); }
();
557
        }
558
    }
559
    if (_c == "jump")
560
    {
561
        if (i_ex(command_actor[i]))
562
        {
563
            command_actor[i].__arg0 = command_arg1[i];
564
            command_actor[i].__arg1 = command_arg2[i];
565
            command_actor[i].__arg2 = command_arg3[i];
566
            command_actor[i].__arg3 = command_arg4[i];
567
            if (!instant)
568
            {
569
                with (command_actor[i])
570
                    
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; } return ___jump; }
(__arg0, __arg1, __arg2, __arg3);
571
            }
572
            else
573
            {
574
                command_actor[i].x = command_arg1[i];
575
                command_actor[i].y = command_arg2[i];
576
            }
577
        }
578
    }
579
    if (_c == "jumpinplace")
580
    {
581
        if (i_ex(command_actor[i]))
582
        {
583
            command_actor[i].__arg0 = command_arg1[i];
584
            command_actor[i].__arg1 = command_arg2[i];
585
            if (!instant)
586
            {
587
                with (command_actor[i])
588
                    
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);
589
            }
590
        }
591
    }
592
    if (_c == "jumpsprite")
593
    {
594
        if (i_ex(command_actor[i]))
595
        {
596
            command_actor[i].__arg0 = command_arg1[i];
597
            command_actor[i].__arg1 = command_arg2[i];
598
            command_actor[i].__arg2 = command_arg3[i];
599
            command_actor[i].__arg3 = command_arg4[i];
600
            command_actor[i].__arg4 = command_arg5[i];
601
            command_actor[i].__arg5 = command_arg6[i];
602
            if (!instant)
603
            {
604
                with (command_actor[i])
605
                    
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);
606
            }
607
            else
608
            {
609
                command_actor[i].x = command_arg1[i];
610
                command_actor[i].y = command_arg2[i];
611
            }
612
        }
613
    }
614
    if (_c == "addxy")
615
    {
616
        command_actor[i].x += command_arg1[i];
617
        command_actor[i].y += command_arg2[i];
618
    }
619
    if (_c == "setxy")
620
    {
621
        command_actor[i].x = command_arg1[i];
622
        command_actor[i].y = command_arg2[i];
623
    }
624
    if (_c == "arg_objectxy")
625
    {
626
        command_arg1[i + 1] = command_arg1[i].x + command_arg2[i];
627
        command_arg2[i + 1] = command_arg1[i].y + command_arg3[i];
628
    }
629
    if (_c == "actortoobject")
630
    {
631
        instance_create(command_actor[i].x, command_actor[i].y, command_arg1[i]);
632
        command_actor[i].visible = 0;
633
    }
634
    if (_c == "actortokris")
635
    {
636
        for (jjj = 0; jjj < 20; jjj++)
637
        {
638
            if (actor_name[jjj] == "kris" && i_ex(actor_id[jjj]))
639
            {
640
                obj_mainchara.x = actor_id[jjj].x;
641
                obj_mainchara.y = actor_id[jjj].y;
642
                obj_mainchara.visible = 1;
643
                actor_id[jjj].visible = 0;
644
                if (actor_id[jjj].facing == "d")
645
                    global.facing = 0;
646
                if (actor_id[jjj].facing == "r")
647
                    global.facing = 1;
648
                if (actor_id[jjj].facing == "u")
649
                    global.facing = 2;
650
                if (actor_id[jjj].facing == "l")
651
                    global.facing = 3;
652
            }
653
        }
654
    }
655
    if (_c == "actortocaterpillar")
656
    {
657
        _caterpillar_moved = 0;
658
        for (lll = 0; lll < 2; lll++)
659
        {
660
            if (i_ex(global.cinstance[lll]))
661
            {
662
                for (jjj = 0; jjj < 20; jjj++)
663
                {
664
                    if (actor_name[jjj] == global.cinstance[lll].name && i_ex(actor_id[jjj]))
665
                    {
666
                        if (global.cinstance[lll].x != actor_id[jjj].x)
667
                        {
668
                            global.cinstance[lll].x = actor_id[jjj].x;
669
                            _caterpillar_moved = 1;
670
                        }
671
                        if (global.cinstance[lll].y != actor_id[jjj].y)
672
                        {
673
                            global.cinstance[lll].y = actor_id[jjj].y;
674
                            _caterpillar_moved = 1;
675
                        }
676
                        
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);
677
                        global.cinstance[lll].visible = 1;
678
                        actor_id[jjj].visible = 0;
679
                    }
680
                }
681
            }
682
        }
683
        if (_caterpillar_moved == 1)
684
        {
685
            with (obj_caterpillarchara)
686
                
scr_caterpillar_interpolate
scr_caterpillar_interpolate

function
scr_caterpillar_interpolate()
{ _newfacing =
scr_facing_letter_to_number(
scr_get_cardinal_direction(point_direction(x, y, obj_mainchara.x, obj_mainchara.y)));
remx[0] = obj_mainchara.x; remy[0] = obj_mainchara.y; facing[0] = _newfacing; for (_iaia = target; _iaia > 0; _iaia -= 1) { remx[_iaia] = lerp(obj_mainchara.x, x, _iaia / target); if (global.darkzone == 1) remy[_iaia] = lerp(obj_mainchara.y, y + 16, _iaia / target); else remy[_iaia] = lerp(obj_mainchara.y, y + 6, _iaia / target); facing[_iaia] = _newfacing; } }
();
687
        }
688
    }
689
    if (_c == "saveload")
690
    {
691
        if (command_arg1[i] == "save")
692
            
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(); }
();
693
        if (command_arg1[i] == "load")
694
            
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();
}
();
695
    }
696
    if (_c == "select")
697
    {
698
        actor_selected = actor_name[command_arg1[i]];
699
        actor_selected_id = actor_id[command_arg1[i]];
700
    }
701
    if (_c == "waitcustom")
702
    {
703
        with (master_object)
704
            customcon = 1;
705
        cs_wait_custom = 1;
706
        waiting = 1;
707
        breakme = 1;
708
    }
709
    if (_c == "waitdialoguer")
710
    {
711
        if (!instant)
712
        {
713
            waiting = 1;
714
            cs_wait_dialogue = 1;
715
            breakme = 1;
716
        }
717
    }
718
    if (_c == "waitbox")
719
    {
720
        if (!instant)
721
        {
722
            waiting = 1;
723
            cs_wait_box = command_arg1[i];
724
            breakme = 1;
725
        }
726
    }
727
    if (_c == "waitboxend")
728
    {
729
        if (!instant)
730
        {
731
            waiting = 1;
732
            cs_wait_box = command_arg1[i];
733
            cs_wait_box_end = true;
734
            breakme = 1;
735
        }
736
    }
737
    if (_c == "waitif")
738
    {
739
        cs_wait_if = 1;
740
        cs_wait_if_objectid = command_arg1[i];
741
        cs_wait_if_varname = command_arg2[i];
742
        cs_wait_if_operator = command_arg3[i];
743
        cs_wait_if_varvalue = command_arg4[i];
744
        waiting = 1;
745
        breakme = 1;
746
    }
747
    if (_c == "wait")
748
    {
749
        cs_wait_amount = command_arg1[i];
750
        if (instant)
751
            cs_wait_amount = 1;
752
        cs_wait_timer = 0;
753
        waiting = 1;
754
        breakme = 1;
755
    }
756
    if (_c == "terminate")
757
    {
758
        terminate_this_frame = 1;
759
        breakme = 1;
760
    }
761
    if (_c == "terminatekillactors")
762
    {
763
        kill_actors = 1;
764
        terminate_this_frame = 1;
765
        breakme = 1;
766
    }
767
}