Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_shootout_controller_Create_0

(view raw script w/o annotations or w/e)
1
alarm[1]
 = 30;
gml_Object_obj_shootout_controller_Alarm_1.gml

kris_invincible = false;
2
shootout_type = 0;
3
shootout_endtimer = 0;
4
endminigame = false;
5
endminigametimer = 0;
6
stopspawns = false;
7
totalhits = 0;
8
obj_mainchara.cutscene = 1;
9
obj_mainchara.freeze = 1;
10
train_x_prev = 9000;
11
train_x_target = 9000;
12
train_x = 9000;
13
train_y = 30;
14
shootout_carriages = [];
15
for (var _i = 0; _i < 9; _i++)
16
{
17
    var _cx = _i * 600;
18
    var _carriage = instance_create_depth(_cx, train_y, depth + 2, obj_shootout_carriage);
19
    if ((_i % 3) == 2)
20
    {
21
        _carriage.sprite_index = spr_shootout_train_new;
22
        _carriage.wave = array_length(shootout_carriages) + 1;
23
        array_push(shootout_carriages, _carriage);
24
    }
25
}
26
current_train = shootout_carriages[0];
27
state = "intro";
28
timer = 0;
29
wave_duration = 1800;
30
wave = 1;
31
speedfactor = 1;
32
pattern = -1;
33
pattern_prev = 0;
34
pattern_timer = -90;
35
if (i_ex(obj_tenna_zoom) && obj_tenna_zoom.minigameinsanity == true)
36
    alarm[1]
 = 0;
gml_Object_obj_shootout_controller_Alarm_1.gml

kris_invincible = false;
37
pattern_performed = [];
38
points = 0;
39
insanitytimer = 0;
40
windows = [];
41
window_columns = 3;
42
window_rows = 3;
43
tutorialorder = 0;
44
shootoutpointvar = 0;
45
for (var _xx = 0; _xx < window_columns; _xx++)
46
{
47
    windows[_xx] = [];
48
    for (var _yy = 0; _yy < window_rows; _yy++)
49
    {
50
        var _window_x = (80 + (_xx * 50)) * 2;
51
        var _window_y = (20 + (_yy * 48)) * 2;
52
        var _window = instance_create_depth(train_x + _window_x, train_y + _window_y, depth + 1, obj_shootout_window);
53
        _window.x_offset = _window_x;
54
        _window.y_offset = _window_y;
55
        _window.column = _xx;
56
        _window.row = _yy;
57
        windows[_xx][_yy] = _window;
58
    }
59
}
60
current_window_column = 1;
61
current_window_row = 1;
62
current_window = windows[current_window_column][current_window_row];
63
aim_x = current_window.x;
64
aim_y = current_window.y;
65
kris_hp = 5;
66
kris_state = "idle";
67
kris_timer = 0;
68
kris_actionable = false;
69
kris_can_shoot = true;
70
kris_invincible = false;
71
kris_jump_held = false;
72
kris_x = -100;
73
kris_x2 = 0;
74
kris_y_ground = 380;
75
kris_y = kris_y_ground;
76
kris_vy = 0;
77
dust_timer = 0;
78
instance_create_depth(80, kris_y, depth - 3, obj_shootout_susie);
79
instance_create_depth(80, kris_y, depth - 3, obj_shootout_kris);
80
instance_create_depth(80, kris_y, depth - 2, obj_shootout_horse);
81
hazard_warning = -1;
82
tennatimer = 0;
83
damage = 10;
84
target = 3;
85
reticle_index = 0;
86
susietimer = 0;
87
if (!i_ex(obj_tenna_enemy))
88
{
89
    with (obj_darkcontroller)
90
        charcon = 1;
91
}
92
windowdelay = 28;
93
if (i_ex(obj_tenna_enemy) && obj_tenna_enemy.cowboy1tooknodamage == true)
94
    windowdelay = 23;
95
beatwithoutgettinghit = true;
96
wreticle_x = 0;
97
wreticle_y = 0;
98
tutorialmode = false;
99
hitcount = 0;
100
if (!i_ex(obj_ch3_GSD03))
101
{
102
    state = "main";
103
    train_x_target = -1050;
104
    kris_actionable = true;
105
}
106
else
107
{
108
    tutorialmode = true;
109
}
110
kris_x = 80;
111
krishit = false;
112
hitwindow = false;
113
invtimer = 0;
114
minigameend = 0;
115
windowcount = 0;
116
music_init = 0;
117
music_init_timer = 0;
118
with (obj_shootout_carriage)
119
{
120
    x = obj_shootout_controller.train_x + x_offset;
121
    y = obj_shootout_controller.train_y + ((cos(x_offset + ((current_time * obj_shootout_controller.wave) / 200)) * 0.5) + 0.5);
122
}
123
var _jump_y_offset = min((kris_y_ground - kris_y) * 0.15, 8);
124
with (obj_shootout_kris)
125
{
126
    x = obj_shootout_horse.x + 68;
127
    y = obj_shootout_horse.y - 66 - _jump_y_offset;
128
}
129
with (obj_shootout_susie)
130
{
131
    x = obj_shootout_horse.x + 38;
132
    y = obj_shootout_horse.y - 72 - _jump_y_offset;
133
}
134
insanity_windows_hit = 0;