Deltarune (Chapter 3) script viewer

← back to main script listing

gml_GlobalScript_scr_set_facing_sprites

(view raw script w/o annotations or w/e)
1
function 
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; ...
(arg0)
2
{
3
    _actorname = arg0;
4
    name = arg0;
5
    if (is_string(_actorname))
6
    {
7
        if (_actorname == "kris")
8
        {
9
            name = "kris";
10
            if (global.darkzone == 0)
11
                _actorname = "krislight";
12
            if (global.darkzone == 1)
13
                _actorname = "krisdark";
14
        }
15
        if (_actorname == "susie")
16
        {
17
            name = "susie";
18
            if (global.darkzone == 0)
19
            {
20
                _actorname = "susielight";
21
                if (global.chapter >= 2)
22
                    _actorname = "susielighteyes";
23
            }
24
            if (global.darkzone == 1)
25
            {
26
                if (global.chapter == 1)
27
                    _actorname = "susiedark";
28
                if (global.chapter >= 2)
29
                    _actorname = "susiedarkeyes";
30
            }
31
        }
32
        if (_actorname == "ralsei")
33
        {
34
            name = "ralsei";
35
            if (global.chapter <= 1)
36
                _actorname = "ralseihat";
37
            if (global.chapter > 1)
38
                _actorname = "ralseinohat";
39
        }
40
        if (_actorname == "noelle")
41
        {
42
            name = "noelle";
43
            if (global.darkzone == 0)
44
                _actorname = "noellelight";
45
            if (global.darkzone == 1)
46
                _actorname = "noelledark";
47
        }
48
        if (_actorname == "berdly")
49
        {
50
            name = "berdly";
51
            if (global.darkzone == 0)
52
                _actorname = "berdlylight";
53
            if (global.darkzone == 1)
54
                _actorname = "berdlydark";
55
        }
56
        if (_actorname == "krislight")
57
        {
58
            usprite = spr_krisu;
59
            rsprite = spr_krisr;
60
            dsprite = spr_krisd;
61
            lsprite = spr_krisl;
62
        }
63
        if (_actorname == "krisdark")
64
        {
65
            usprite = spr_krisu_dark;
66
            rsprite = spr_krisr_dark;
67
            dsprite = spr_krisd_dark;
68
            lsprite = spr_krisl_dark;
69
            if (global.chapter == 3)
70
            {
71
                if (
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; }
(1076) == 1 ||
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; }
(1077) == 1)
72
                    usprite = spr_krisu_dark_cool;
73
            }
74
        }
75
        if (_actorname == "susielight")
76
        {
77
            usprite = spr_susieu;
78
            rsprite = spr_susier;
79
            dsprite = spr_susied;
80
            lsprite = spr_susiel;
81
        }
82
        if (_actorname == "susielighteyes")
83
        {
84
            usprite = spr_susie_walk_up_lw;
85
            rsprite = spr_susie_walk_right_lw;
86
            dsprite = spr_susie_walk_down_lw;
87
            lsprite = spr_susie_walk_left_lw;
88
        }
89
        if (_actorname == "susiedark")
90
        {
91
            usprite = spr_susieu_dark;
92
            rsprite = spr_susier_dark;
93
            dsprite = spr_susied_dark;
94
            lsprite = spr_susiel_dark;
95
            specialsprite[4] = spr_susie_shock_r;
96
            specialsprite[5] = spr_susie_shock;
97
        }
98
        if (_actorname == "susiedarkeyes")
99
        {
100
            usprite = spr_susie_walk_up_dw;
101
            rsprite = spr_susie_walk_right_dw;
102
            dsprite = spr_susie_walk_down_dw;
103
            lsprite = spr_susie_walk_left_dw;
104
            specialsprite[4] = spr_susie_shock_r;
105
            specialsprite[5] = spr_susie_shock;
106
        }
107
        if (_actorname == "susieunhappy")
108
        {
109
            name = "susie";
110
            if (global.darkzone == 1)
111
            {
112
                usprite = spr_susie_walk_up_dw;
113
                rsprite = spr_susie_walk_right_dw_unhappy;
114
                dsprite = spr_susie_walk_down_dw_unhappy;
115
                lsprite = spr_susie_walk_left_dw_unhappy;
116
            }
117
            else
118
            {
119
                usprite = spr_susie_walk_up_lw;
120
                rsprite = spr_susie_walk_right_lw_unhappy;
121
                dsprite = spr_susie_walk_down_lw_unhappy;
122
                lsprite = spr_susie_walk_left_lw_unhappy;
123
            }
124
            specialsprite[4] = spr_susie_shock_r;
125
            specialsprite[5] = spr_susie_shock;
126
        }
127
        if (_actorname == "noellelight")
128
        {
129
            usprite = spr_noelle_walk_up_lw;
130
            rsprite = spr_noelle_walk_right_lw;
131
            dsprite = spr_noelle_walk_down_lw;
132
            lsprite = spr_noelle_walk_left_lw;
133
        }
134
        if (_actorname == "noelledark")
135
        {
136
            usprite = spr_noelle_walk_up_dw;
137
            lsprite = spr_noelle_walk_left_dw;
138
            rsprite = spr_noelle_walk_right_dw;
139
            dsprite = spr_noelle_walk_down_dw;
140
        }
141
        if (_actorname == "berdlylight")
142
        {
143
            usprite = spr_berdly_walk_up_lw;
144
            rsprite = spr_berdly_walk_right_lw;
145
            dsprite = spr_berdly_walk_down_lw;
146
            lsprite = spr_berdly_walk_left_lw;
147
        }
148
        if (_actorname == "berdlydark")
149
        {
150
        }
151
        if (_actorname == "berdlyunhappy")
152
        {
153
        }
154
        if (_actorname == "ralseihat")
155
        {
156
            name = "ralsei";
157
            usprite = spr_ralseiu;
158
            rsprite = spr_ralseir;
159
            dsprite = spr_ralseid;
160
            lsprite = spr_ralseil;
161
            specialsprite[5] = spr_ralsei_shock_overworld;
162
        }
163
        if (_actorname == "ralseinohat")
164
        {
165
            name = "ralsei";
166
            usprite = spr_ralsei_walk_up;
167
            rsprite = spr_ralsei_walk_right;
168
            dsprite = spr_ralsei_walk_down;
169
            lsprite = spr_ralsei_walk_left;
170
        }
171
        if (_actorname == "ralseiunhappy")
172
        {
173
            name = "ralsei";
174
            usprite = spr_ralsei_walk_up;
175
            rsprite = spr_ralsei_walk_right_unhappy;
176
            dsprite = spr_ralsei_walk_down_unhappy;
177
            lsprite = spr_ralsei_walk_left_unhappy;
178
        }
179
        if (_actorname == "lancer")
180
        {
181
            name = "lancer";
182
            usprite = spr_lancer_ut;
183
            rsprite = spr_lancer_rt;
184
            dsprite = spr_lancer_dt;
185
            lsprite = spr_lancer_lt;
186
        }
187
        if (_actorname == "toriel")
188
        {
189
            name = "toriel";
190
            usprite = spr_toriel_u;
191
            rsprite = spr_toriel_r;
192
            dsprite = spr_toriel_d;
193
            lsprite = spr_toriel_l;
194
        }
195
        if (_actorname == "alphys")
196
        {
197
            name = "alphys";
198
            usprite = spr_alphysu;
199
            rsprite = spr_alphysr;
200
            dsprite = spr_alphysd;
201
            lsprite = spr_alphysl;
202
        }
203
        if (_actorname == "car")
204
        {
205
            usprite = spr_torcar_u;
206
            dsprite = spr_torcar_d;
207
            lsprite = spr_torcar_l;
208
            rsprite = spr_torcar_r;
209
        }
210
        if (_actorname == "queen")
211
        {
212
            name = "queen";
213
            usprite = spr_queen_walk_up;
214
            dsprite = spr_queen_walk_down;
215
            lsprite = spr_queen_walk_left;
216
            rsprite = spr_queen_walk_right;
217
        }
218
        if (_actorname == "queenchair")
219
        {
220
            name = "queen";
221
            specialsprite[5] = spr_queen_chair_ohoho_1;
222
        }
223
        if (_actorname == "asgore")
224
        {
225
            name = "asgore";
226
            usprite = spr_asgoreu;
227
            dsprite = spr_asgored;
228
            lsprite = spr_asgorel;
229
            rsprite = spr_asgorer;
230
        }
231
        if (_actorname == "tenna")
232
        {
233
            name = "tenna";
234
            usprite = spr_tenna_hooray;
235
            dsprite = spr_tenna_hooray;
236
            lsprite = spr_tenna_hooray;
237
            rsprite = spr_tenna_hooray;
238
        }
239
    }
240
    else
241
    {
242
        usprite = _actorname;
243
        dsprite = _actorname;
244
        rsprite = _actorname;
245
        lsprite = _actorname;
246
        sprite_index = _actorname;
247
    }
248
    specialsprite[0] = dsprite;
249
    specialsprite[1] = rsprite;
250
    specialsprite[2] = usprite;
251
    specialsprite[3] = lsprite;
252
    dtsprite = dsprite;
253
    rtsprite = rsprite;
254
    utsprite = usprite;
255
    ltsprite = lsprite;
256
}