Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_shootout_controller_Other_10

(view raw script w/o annotations or w/e)
1
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
2
{
3
    if (keyboard_check_pressed(ord("1")))
4
    {
5
        state = "wave_outro";
6
        wave = 0;
7
        timer = -1;
8
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("switch to wave 1");
9
    }
10
    if (keyboard_check_pressed(ord("2")))
11
    {
12
        state = "wave_outro";
13
        wave = 1;
14
        timer = -1;
15
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("switch to wave 2");
16
    }
17
    if (keyboard_check_pressed(ord("3")))
18
    {
19
        state = "wave_outro";
20
        wave = 2;
21
        timer = -1;
22
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("switch to wave 3");
23
    }
24
    if (keyboard_check_pressed(ord("H")))
25
        kris_hp = 5;
26
}
27
if (i_ex(obj_tenna_enemy))
28
{
29
    tennatimer++;
30
    if (tennatimer == 270 && obj_tenna_zoom.con != 2 && obj_tenna_zoom.minigameinsanity == false)
31
    {
32
        with (obj_tenna_zoom)
33
        {
34
            con = 2;
35
            timer = -1;
36
        }
37
    }
38
}
39
shootout_endtimer++;
40
if (shootout_type == 0 && shootout_endtimer > 540)
41
    stopspawns = true;
42
if (shootout_type == 0 && shootout_endtimer > 600)
43
    endminigame = true;
44
if (shootout_type == 1 && shootout_endtimer > 540)
45
    stopspawns = true;
46
if (shootout_type == 1 && shootout_endtimer == 600)
47
    endminigame = true;
48
if (shootout_type == 2 && shootout_endtimer > 540)
49
    stopspawns = true;
50
if (shootout_type == 2 && shootout_endtimer == 600)
51
    endminigame = true;
52
switch (state)
53
{
54
    case "intro":
55
        kris_actionable = false;
56
        var _intro_duration = 5;
57
        current_train = shootout_carriages[0];
58
        kris_x = ease_out_back(ease_in_sine(max(0, timer - 0), 0, _intro_duration, _intro_duration), -120, 180, _intro_duration - 0);
59
        train_x_prev = 650;
60
        train_x_target = -current_train.x_offset + 150;
61
        train_x = ease_out_sine(timer, train_x_prev, train_x_target - train_x_prev, _intro_duration);
62
        if (timer >= _intro_duration)
63
        {
64
            kris_actionable = true;
65
            state = "main";
66
            timer = -1;
67
            aim_x = current_window.x;
68
            aim_y = current_window.y;
69
        }
70
        break;
71
    case "wave_intro":
72
        kris_actionable = false;
73
        current_train = shootout_carriages[wave - 1];
74
        train_x_target = -current_train.x_offset + 150;
75
        var _intro_duration = 120;
76
        if (i_ex(obj_tenna_enemy))
77
        {
78
            layer_hspeed(bg, lerp(layer_get_hspeed(bg), -(wave * 1), timer / _intro_duration));
79
            layer_hspeed(md_back, lerp(layer_get_hspeed(md_back), -(wave * 2), timer / _intro_duration));
80
            layer_hspeed(md, lerp(layer_get_hspeed(md), -(wave * 3), timer / _intro_duration));
81
            layer_hspeed(fg, lerp(layer_get_hspeed(fg), -4 - (wave * 4), timer / _intro_duration));
82
        }
83
        else
84
        {
85
            layer_hspeed("bg", lerp(layer_get_hspeed("bg"), -(wave * 1), timer / _intro_duration));
86
            layer_hspeed("md_back", lerp(layer_get_hspeed("md_back"), -(wave * 2), timer / _intro_duration));
87
            layer_hspeed("md", lerp(layer_get_hspeed("md"), -(wave * 3), timer / _intro_duration));
88
            layer_hspeed("fg", lerp(layer_get_hspeed("fg"), -4 - (wave * 4), timer / _intro_duration));
89
        }
90
        var _factor = ease_in_sine(timer, 0, 1, _intro_duration);
91
        train_x = ease_out_back(_factor, train_x_prev, train_x_target - train_x_prev, 1, 1);
92
        with (obj_shootout_carriage)
93
            image_speed = lerp(image_speed, 0.5 + (other.wave * 0.5), 0.2);
94
        if (timer >= _intro_duration)
95
        {
96
            kris_actionable = true;
97
            state = "main";
98
            timer = -1;
99
            aim_x = current_window.x;
100
            aim_y = current_window.y;
101
        }
102
        break;
103
    case "wave_outro":
104
        hazard_warning = -1;
105
        kris_actionable = false;
106
        train_x_target = -current_train.x_offset + 150;
107
        if (timer == 0)
108
        {
109
            with (obj_shootout_window)
110
                event_user(14);
111
        }
112
        if (timer < 10)
113
        {
114
            train_x = lerp(train_x, train_x_target, 0.2);
115
        }
116
        else
117
        {
118
            train_x_prev = train_x_target;
119
            timer = -1;
120
            if (wave < 3)
121
                wave++;
122
            state = "wave_intro";
123
        }
124
        break;
125
    case "main":
126
        train_x = train_x_target + (sin(timer / 20) * 10);
127
        if (obj_shootout_controller.shootout_type == 3)
128
        {
129
            with (obj_shootout_window)
130
                krspopout = false;
131
            with (obj_shootout_window)
132
                event_user(12);
133
        }
134
        var _prev_col = current_window_column;
135
        var _prev_row = current_window_row;
136
        current_window_column = (1 + right_h()) - left_h();
137
        current_window_column = clamp(current_window_column, 0, window_columns - 1);
138
        current_window_row = (1 + down_h()) - up_h();
139
        current_window_row = clamp(current_window_row, 0, window_rows - 1);
140
        var _new_window = windows[current_window_column][current_window_row];
141
        if (_new_window.active == false)
142
        {
143
            current_window_column = _prev_col;
144
            current_window_row = _prev_row;
145
        }
146
        else
147
        {
148
            current_window = _new_window;
149
            current_window.krspopout = true;
150
        }
151
        aim_x = lerp(aim_x, current_window.x, 0.7);
152
        aim_y = lerp(aim_y, current_window.y, 0.7);
153
        if (point_distance(aim_x, aim_y, current_window.x, current_window.y) < 3)
154
        {
155
            aim_x = current_window.x;
156
            aim_y = current_window.y;
157
        }
158
        if ((timer % 120) == 0)
159
        {
160
            if (irandom(2) == 0)
161
            {
162
            }
163
        }
164
        if (hazard_warning >= 0 && endminigame == false)
165
        {
166
            if (hazard_warning == 0)
167
            {
168
                var _hazard = instance_create_depth(640, kris_y_ground, depth - 1, obj_shootout_cactus);
169
                _hazard.hspeed = -4 - (wave * 4);
170
            }
171
            hazard_warning--;
172
        }
173
        if (timer == 0 && endminigame == false)
174
        {
175
            pattern_performed = array_create(50, 0);
176
            pattern = -1;
177
            pattern_timer = 0;
178
        }
179
        if (pattern == -1 && endminigame == false)
180
        {
181
            var _a = 0;
182
            if (shootout_type > 0)
183
                _a = 0.5;
184
            var _speedfactor_start, _speedfactor_end;
185
            switch (wave)
186
            {
187
                case 1:
188
                    _speedfactor_start = 2 + random(1) + _a;
189
                    _speedfactor_end = _speedfactor_start + random(0.5) + _a;
190
                    break;
191
                case 2:
192
                    _speedfactor_start = 1.5;
193
                    _speedfactor_end = 3;
194
                    break;
195
                case 3:
196
                    _speedfactor_start = 2.5;
197
                    _speedfactor_end = 4;
198
                    break;
199
            }
200
            speedfactor = lerp(_speedfactor_start, _speedfactor_end, clamp(timer / wave_duration, 0, 1));
201
            if (pattern_prev == 1)
202
            {
203
                if (pattern_performed[2] > pattern_performed[3])
204
                    pattern = 3;
205
                else
206
                    pattern = 2;
207
            }
208
            else
209
            {
210
                pattern = 1;
211
            }
212
            if (irandom(10) == 0)
213
                pattern = 4;
214
            pattern = 1;
215
            if (endminigame == true)
216
                pattern = -1;
217
        }
218
        if (pattern_timer == 0 && endminigame == false)
219
        {
220
            pattern_performed[pattern] += 1;
221
            debug_message("pattern: " + string(pattern));
222
        }
223
        switch (pattern)
224
        {
225
            case 0:
226
                if (pattern_timer == 0)
227
                {
228
                }
229
                if (pattern_timer >= 10)
230
                {
231
                    pattern = -1;
232
                    pattern_timer = -1;
233
                }
234
                break;
235
            case 1:
236
                if (pattern_timer >= 60)
237
                {
238
                    pattern_prev = pattern;
239
                    pattern = 0;
240
                    pattern_timer = -1;
241
                    break;
242
                }
243
                var _window_delay = floor(120 - (speedfactor * 30));
244
                if (_window_delay < 5)
245
                    _window_delay = 5;
246
                if ((pattern_timer % _window_delay) == 0 && stopspawns == false && alarm[1]
 < 1)
gml_Object_obj_shootout_controller_Alarm_1.gml

kris_invincible = false;
247
                {
248
                    var _available_windows = [];
249
                    with (obj_shootout_window)
250
                    {
251
                        if (state == "closed" && active)
252
                            array_push(_available_windows, id);
253
                    }
254
                    if (array_length(_available_windows) > 0)
255
                    {
256
                        var _chosen_window = _available_windows[irandom(array_length(_available_windows) - 1)];
257
                        with (_chosen_window)
258
                        {
259
                            event_user(12);
260
                            if (type == 2)
261
                                duration = 30;
262
                        }
263
                    }
264
                }
265
                break;
266
            case 2:
267
                if (pattern_timer >= floor(150 + (speedfactor * 15)))
268
                {
269
                    with (obj_shootout_window)
270
                    {
271
                    }
272
                    pattern_prev = pattern;
273
                    pattern = 0;
274
                    pattern_timer = -1;
275
                    break;
276
                }
277
                if (pattern_timer == 10 || pattern_timer == 20 || pattern_timer == 30)
278
                {
279
                    with (obj_shootout_window)
280
                    {
281
                        if (active)
282
                        {
283
                            var _flash = 
scr_oflash
scr_oflash

function
scr_oflash(arg0 = false)
{ var _oflash = instance_create_depth(x, y, depth - 1, obj_oflash); _oflash.image_xscale = image_xscale; _oflash.image_yscale = image_yscale; _oflash.image_speed = 0; _oflash.image_index = image_index; _oflash.sprite_index = sprite_index; _oflash.target = id; _oflash.follow = arg0; return _oflash; }
(true);
284
                            _flash.depth = other.depth - 1;
285
                        }
286
                    }
287
                }
288
                if (pattern_timer == 40)
289
                {
290
                    with (obj_shootout_window)
291
                    {
292
                        event_user(12);
293
                        duration = (type == 1) ? 999 : 60;
294
                        idle_duration = floor(20 + (other.speedfactor * 15));
295
                    }
296
                }
297
                break;
298
            case 3:
299
                var _delay_between = floor(26 - (speedfactor * 3));
300
                var _time_per_row = _delay_between * (window_columns * 2);
301
                if (pattern_timer >= (_time_per_row * window_rows))
302
                {
303
                    pattern_prev = pattern;
304
                    pattern = 0;
305
                    pattern_timer = -1;
306
                    break;
307
                }
308
                var _timer = pattern_timer % _time_per_row;
309
                var _row = floor(pattern_timer div _time_per_row);
310
                if (_timer == 0)
311
                {
312
                    with (obj_shootout_window)
313
                        event_user(14);
314
                }
315
                if (_timer >= 0 && _timer <= (_delay_between * (window_columns - 1)))
316
                {
317
                    if ((_timer % _delay_between) == 0)
318
                    {
319
                        var _xx = _timer div _delay_between;
320
                        if ((_row % 2) == 1)
321
                            _xx = window_columns - 1 - _xx;
322
                        with (windows[_xx][_row])
323
                        {
324
                            if (!active)
325
                                continue;
326
                            event_user(12);
327
                            type = 
scr_weighted_choice
scr_weighted_choice

function
scr_weighted_choice()
{ var _n = 0; for (var _i = 1; _i < argument_count; _i += 2) { if (argument[_i] <= 0) continue; _n += argument[_i]; } _n = random(_n); for (var _i = 1; _i < argument_count; _i += 2) { if (argument[_i] <= 0) continue; _n -= argument[_i]; if (_n < 0) return argument[_i - 1]; } return argument[0]; }
(1, 2.5, 2, 1);
328
                            if (shootout_type == 0 || shootout_type == 1)
329
                                type = 1;
330
                            if (type == 2)
331
                                duration = 60;
332
                            else
333
                                duration = 9999;
334
                        }
335
                    }
336
                }
337
                if (_timer >= 0 && _timer <= (_delay_between * ((window_columns * 2) - 1)))
338
                {
339
                    with (obj_shootout_window)
340
                    {
341
                        if (!active)
342
                            continue;
343
                        if (char_state == "idle" && type == 1)
344
                        {
345
                            var _shoot_delay = ((column % 2) == 1) ? (_delay_between * other.window_columns) : (_delay_between * (other.window_columns + 2));
346
                            if (_timer < _shoot_delay)
347
                                char_timer = min(char_timer, idle_duration - 2);
348
                            else
349
                                char_timer = idle_duration;
350
                        }
351
                    }
352
                }
353
                break;
354
            case 4:
355
                if (pattern_timer == 0)
356
                {
357
                    var _available_windows = [];
358
                    with (obj_shootout_window)
359
                    {
360
                        if (state == "closed" && active)
361
                            array_push(_available_windows, id);
362
                    }
363
                    if (shootout_type == 0 || shootout_type == 1)
364
                    {
365
                    }
366
                    var _window = _available_windows[irandom(array_length(_available_windows) - 1)];
367
                    with (_window)
368
                    {
369
                        event_user(12);
370
                        type = 3;
371
                    }
372
                }
373
                if (pattern_timer > floor(50 - (speedfactor * 10)))
374
                {
375
                    pattern_prev = pattern;
376
                    pattern = 0;
377
                    pattern_timer = -1;
378
                }
379
                break;
380
        }
381
        if (timer >= wave_duration)
382
        {
383
        }
384
        break;
385
}
386
timer++;
387
pattern_timer++;
388
if (kris_state == "idle")
389
{
390
    if (kris_y == kris_y_ground)
391
        obj_shootout_kris.sprite_index = kris_can_shoot ? spr_kris_ride_2 : spr_kris_ride_1;
392
    else
393
        obj_shootout_kris.sprite_index = kris_can_shoot ? spr_kris_ride_jump_2 : spr_kris_ride_jump_1;
394
    if (kris_actionable)
395
    {
396
        if (button1_p() && shootout_type != 3)
397
        {
398
            kris_state = "shoot";
399
            kris_timer = -1;
400
        }
401
    }
402
}
403
if (kris_state == "shoot")
404
{
405
    if (kris_timer == 0)
406
    {
407
        obj_shootout_kris.sprite_index = (kris_y == kris_y_ground) ? spr_kris_ride_shoot : spr_kris_ride_jump_shoot;
408
        obj_shootout_kris.image_index = 0;
409
        snd_play(snd_gunshot);
410
        snd_play_x(snd_rocket, 1, 1.5);
411
        reticle_index = 1;
412
        with (current_window)
413
            event_user(13);
414
        var _line = instance_create_depth(obj_shootout_kris.x + 32, obj_shootout_kris.y - 24, obj_shootout_kris.depth, obj_shootout_line);
415
        _line.tx = current_window.x;
416
        _line.ty = current_window.y;
417
    }
418
    if (kris_timer >= 3)
419
    {
420
        alarm[2]
 = 10;
gml_Object_obj_shootout_controller_Alarm_2.gml

kris_can_shoot = true;
421
        kris_can_shoot = false;
422
        kris_state = "idle";
423
        kris_timer = -1;
424
    }
425
}
426
if ((button2_p() && kris_actionable && kris_y == kris_y_ground) && shootout_type != 3)
427
{
428
    kris_jump_held = true;
429
    kris_vy = -10;
430
}
431
if ((!button2_h() || (kris_y_ground - kris_y) > 50) && shootout_type != 3)
432
    kris_jump_held = false;
433
if (kris_jump_held)
434
    kris_vy -= 1;
435
kris_vy += 1;
436
kris_y += kris_vy;
437
if (kris_y > kris_y_ground)
438
{
439
    if (kris_vy > 1)
440
        dust_timer = 0;
441
    kris_y = min(kris_y, kris_y_ground);
442
    kris_vy = 0;
443
}
444
obj_shootout_horse.x = kris_x + kris_x2 + (sin(current_time / 600) * 8);
445
obj_shootout_horse.y = kris_y;
446
if (kris_y == kris_y_ground && shootout_type != 3)
447
{
448
    obj_shootout_horse.sprite_index = spr_ralsei_horse_run;
449
    if ((dust_timer % 12) == 0)
450
    {
451
        var _dust = instance_create_depth(obj_shootout_horse.x + 24 + irandom(8), kris_y_ground - 18, depth - 2, obj_shootout_dust);
452
        _dust.hspeed = -4;
453
    }
454
    if ((dust_timer % 8) == 0)
455
    {
456
        var _dust = instance_create_depth(obj_shootout_horse.x + 48, kris_y_ground - 12, depth - 2, obj_shootout_dust);
457
        _dust.hspeed = -3.5;
458
    }
459
    if ((dust_timer % 6) == 0)
460
    {
461
        var _dust = instance_create_depth(obj_shootout_horse.x + 94, kris_y_ground - 12, depth - 2, obj_shootout_dust);
462
        _dust.hspeed = -3;
463
    }
464
    dust_timer++;
465
}
466
else
467
{
468
    obj_shootout_horse.sprite_index = spr_ralsei_horse_jump;
469
}
470
var _jump_y_offset = min((kris_y_ground - kris_y) * 0.15, 8);
471
with (obj_shootout_kris)
472
{
473
    x = obj_shootout_horse.x + 68;
474
    y = obj_shootout_horse.y - 66 - _jump_y_offset;
475
    if (other.kris_y == other.kris_y_ground)
476
    {
477
        y -= (round(cos(((obj_shootout_horse.image_index + 1) / 8) * pi * 2)) * 2);
478
    }
479
    else
480
    {
481
    }
482
}
483
with (obj_shootout_susie)
484
{
485
    x = obj_shootout_horse.x + 38;
486
    y = obj_shootout_horse.y - 72 - _jump_y_offset;
487
    if (other.kris_y == other.kris_y_ground)
488
    {
489
        sprite_index = spr_susie_ride;
490
        y -= (round(cos(((obj_shootout_horse.image_index + 2) / 8) * pi * 2)) * 2);
491
    }
492
    else
493
    {
494
        sprite_index = spr_susie_ride_jump;
495
    }
496
}
497
var _hazard_hit;
498
with (obj_shootout_horse)
499
    _hazard_hit = place_meeting(x, y, obj_shootout_hazard);
500
if (_hazard_hit && !kris_invincible && state == "main")
501
{
502
    kris_actionable = false;
503
    kris_invincible = true;
504
    alarm[1]
 = 30;
gml_Object_obj_shootout_controller_Alarm_1.gml

kris_invincible = false;
505
    alarm[0]
 = 12;
gml_Object_obj_shootout_controller_Alarm_0.gml

kris_actionable = true;
506
    kris_vy = -8;
507
    global.interact = 1;
508
    if (i_ex(obj_tenna_enemy))
509
    {
510
        
scr_shakescreen
scr_shakescreen

function
scr_shakescreen()
{ instance_create(x, y, obj_shake); }
();
511
        global.inv = -1;
512
        obj_tenna_enemy.minigamefailcount++;
513
        if (obj_tenna_enemy.minigamefailcount == 3)
514
        {
515
            with (obj_tenna_zoom)
516
            {
517
                con = 2;
518
                timer = -1;
519
            }
520
        }
521
    }
522
    else
523
    {
524
        global.inv = -1;
525
        
scr_damage_all_overworld
scr_damage_all_overworld

function
scr_damage_all_overworld()
{ if (global.inv < 0) { gameover = 1; if (global.char[0] != 0 && global.hp[global.char[0]] > 1) gameover = 0; if (global.char[1] != 0 && global.hp[global.char[1]] > 1) gameover = 0; if (global.char[2] != 0 && global.hp[global.char[2]] > 1) gameover = 0; if (gameover == 1) { with (obj_event_manager) trigger_event(UnknownEnum.Value_1);
scr_gameover();
}
scr_damage_cache();
remdamage = damage; remtarget = target; if (!instance_exists(obj_shake)) instance_create(0, 0, obj_shake); with (obj_dmgwriter) killactive = 1; snd_stop(snd_hurt1); snd_play(snd_hurt1); for (ti = 0; ti < 3; ti += 1) { global.inv = -1; damage = remdamage; target = ti; tdamage = damage; with (global.charinstance[target]) { hurt = 1; hurttimer = 0; } hpdiff = tdamage; if (hpdiff >= global.hp[global.char[target]]) hpdiff = global.hp[global.char[target]] - 1; d_cancel = 0; if (hpdiff <= 1) { if (global.hp[global.char[target]] <= 0) { hpdiff = 0; d_cancel = 1; } else { hpdiff = 1; } } if (d_cancel == 0) { doomtype = -1; global.hp[global.char[target]] -= hpdiff; if (global.charinstance[target].visible == true || (global.chapter == 3 && room == room_shootout)) { dmgwriter = instance_create(global.charinstance[target].x, (global.charinstance[target].y + global.charinstance[target].myheight) - 24, obj_dmgwriter); dmgwriter.damage = hpdiff; dmgwriter.type = doomtype; } } if (global.hp[global.char[target]] < 1) global.hp[global.char[target]] = 1; } scr_damage_check(); target = remtarget; global.inv = global.invc * 30; } } enum UnknownEnum { Value_1 = 1 }
();
526
        with (obj_darkcontroller)
527
            charcon = 1;
528
        with (obj_dmgwriter)
529
        {
530
            x = camerax() + 60;
531
            if (instance_number(obj_dmgwriter) > 1)
532
                instance_destroy();
533
        }
534
    }
535
    var _inst = instance_place(x, y, obj_shootout_hazard);
536
    with (_inst)
537
        instance_destroy();
538
    snd_play(snd_hurt1);
539
}
540
if (kris_invincible)
541
{
542
    with (obj_shootout_horse)
543
    {
544
        if (!instance_exists(flash))
545
            flash = 
scr_oflash
scr_oflash

function
scr_oflash(arg0 = false)
{ var _oflash = instance_create_depth(x, y, depth - 1, obj_oflash); _oflash.image_xscale = image_xscale; _oflash.image_yscale = image_yscale; _oflash.image_speed = 0; _oflash.image_index = image_index; _oflash.sprite_index = sprite_index; _oflash.target = id; _oflash.follow = arg0; return _oflash; }
(true);
546
    }
547
    with (obj_shootout_kris)
548
    {
549
        if (!instance_exists(flash))
550
            flash = 
scr_oflash
scr_oflash

function
scr_oflash(arg0 = false)
{ var _oflash = instance_create_depth(x, y, depth - 1, obj_oflash); _oflash.image_xscale = image_xscale; _oflash.image_yscale = image_yscale; _oflash.image_speed = 0; _oflash.image_index = image_index; _oflash.sprite_index = sprite_index; _oflash.target = id; _oflash.follow = arg0; return _oflash; }
(true);
551
    }
552
    with (obj_shootout_susie)
553
    {
554
        if (!instance_exists(flash))
555
            flash = 
scr_oflash
scr_oflash

function
scr_oflash(arg0 = false)
{ var _oflash = instance_create_depth(x, y, depth - 1, obj_oflash); _oflash.image_xscale = image_xscale; _oflash.image_yscale = image_yscale; _oflash.image_speed = 0; _oflash.image_index = image_index; _oflash.sprite_index = sprite_index; _oflash.target = id; _oflash.follow = arg0; return _oflash; }
(true);
556
    }
557
}
558
if (obj_shootout_kris.sprite_index == spr_kris_ride_1 || obj_shootout_kris.sprite_index == spr_kris_ride_jump_1)
559
{
560
    if ((timer % 3) == 0)
561
    {
562
        var _hrt = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
563
        _hrt.depth = depth - 5;
564
        _hrt.x = obj_shootout_kris.x + 18;
565
        _hrt.y = obj_shootout_kris.y - 28;
566
        _hrt.sprite_index = spr_shootout_heart;
567
        _hrt.image_xscale = 1;
568
        _hrt.image_yscale = 1;
569
        _hrt.direction = 135;
570
        _hrt.speed = 2;
571
        _hrt.image_speed = 0;
572
        _hrt.image_index = 1;
573
        _hrt.fadeSpeed = 0.1;
574
    }
575
}
576
kris_timer++;
577
if (endminigame == true)
578
    kris_x2 += 6;
579
if (kris_x2 == 600)
580
    
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; }
(10);
581
if (kris_x2 == 720)
582
{
583
    if (room == room_shootout)
584
        room_goto(room_battletest );
585
    
scr_fadein
scr_fadein

function
scr_fadein(arg0)
{ __fadeouter = instance_create(0, 0, obj_fadein); __fadeouter.fadespeed = -1 / arg0; __fadeouter.depth = 3; return __fadeouter; }
(10);
586
}