Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_arcade_boss_Step_0

(view raw script w/o annotations or w/e)
1
if (arc_enemy_death == false)
2
{
3
    if (step > 0 && arc_enemy_hp < 70)
4
    {
5
        x += arc_enemy_hsp
6
        if (x > 200)
7
            arc_enemy_hsp = -2
8
        else if (x < 100)
9
            arc_enemy_hsp = 2
10
    }
11
    if (arc_boss_attack == 0)
12
    {
13
        switch step
14
        {
15
            case 0:
16
                if (y < y_destination)
17
                    y += 1.5
18
                else
19
                    step++
20
                break
21
            case 1:
22
                if (wait_timer > 0)
23
                    wait_timer--
24
                else
25
                    step++
26
                break
27
            case 2:
28
                arc_boss_attack = choose(1, 2, 3)
29
                step = 0
30
                break
31
            case 6:
32
                wait_timer = 90
33
                step = 1
34
                break
35
        }
36
37
    }
38
    if (arc_boss_attack == 1)
39
    {
40
        switch step
41
        {
42
            case 0:
43
                if (wait_timer > 0)
44
                    wait_timer--
45
                else
46
                {
47
                    step++
48
                    wait_timer = 15
49
                    instance_create((x + 10), (y + 10), obj_arcade_enemy_tear)
50
                }
51
                break
52
            case 1:
53
                if (wait_timer > 0)
54
                    wait_timer--
55
                else
56
                {
57
                    step++
58
                    wait_timer = 15
59
                    instance_create((x - 10), (y + 10), obj_arcade_enemy_tear)
60
                }
61
                break
62
            case 2:
63
                arc_boss_attack = 0
64
                wait_timer = 90
65
                step = 1
66
                break
67
        }
68
69
    }
70
    if (arc_boss_attack == 2)
71
    {
72
        switch step
73
        {
74
            case 0:
75
                if (wait_timer > 0)
76
                    wait_timer--
77
                else
78
                {
79
                    step++
80
                    wait_timer = 15
81
                    instance_create(90, 40, obj_arcade_enemy)
82
                    instance_create(225, 40, obj_arcade_enemy)
83
                }
84
                break
85
            case 1:
86
                arc_boss_attack = 0
87
                wait_timer = 75
88
                step = 1
89
                break
90
        }
91
92
    }
93
    if (arc_boss_attack == 3)
94
    {
95
        switch step
96
        {
97
            case 0:
98
                if (wait_timer > 0)
99
                    wait_timer--
100
                else
101
                {
102
                    step++
103
                    wait_timer = 10
104
                    instance_create((x - 24), (y + 16), obj_arcade_enemy_homing)
105
                }
106
                break
107
            case 1:
108
                if (wait_timer > 0)
109
                    wait_timer--
110
                else
111
                {
112
                    step++
113
                    wait_timer = 15
114
                    instance_create((x - 12), (y + 20), obj_arcade_enemy_homing)
115
                }
116
                break
117
            case 2:
118
                if (wait_timer > 0)
119
                    wait_timer--
120
                else
121
                {
122
                    step++
123
                    wait_timer = 15
124
                    instance_create(x, (y + 24), obj_arcade_enemy_homing)
125
                }
126
                break
127
            case 3:
128
                if (wait_timer > 0)
129
                    wait_timer--
130
                else
131
                {
132
                    step++
133
                    wait_timer = 15
134
                    instance_create((x + 12), (y + 20), obj_arcade_enemy_homing)
135
                }
136
                break
137
            case 4:
138
                if (wait_timer > 0)
139
                    wait_timer--
140
                else
141
                {
142
                    step++
143
                    wait_timer = 15
144
                    instance_create((x + 24), (y + 16), obj_arcade_enemy_homing)
145
                }
146
                break
147
            case 5:
148
                arc_boss_attack = 0
149
                wait_timer = 90
150
                step = 1
151
                break
152
        }
153
154
    }
155
}
156
else
157
{
158
    if (step == 0)
159
    {
160
        audio_play_sound(snd_mew_boss_spare, 1, 0)
161
        audio_sound_gain(mus_mew_boss, 0, 3000)
162
        step++
163
    }
164
    if (step == 1)
165
    {
166
        if (image_index >= (image_number - 1))
167
        {
168
            image_speed = 0
169
            arc_enemy_hsp = 3
170
            audio_play_sound(snd_mew_seeya, 1, 0)
171
            step++
172
        }
173
    }
174
    if (step == 2)
175
        x += arc_enemy_hsp
176
}
177
if (x > 260)
178
{
179
    instance_destroy()
180
    instance_deactivate_all(true)
181
    instance_activate_object(obj_pl)
182
    instance_activate_object(global.party_member)
183
    instance_activate_object(obj_controller)
184
    instance_activate_object(obj_radio)
185
    instance_activate_object(obj_arcade_controller)
186
    obj_arcade_controller.arcade_game_win = true
187
    audio_play_sound(choose(477, 478), 1, 0)
188
}