Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_arcade_controller_Step_0

(view raw script w/o annotations or w/e)
1
if (arcade_intro == true)
2
    return;
3
if arcade_game_win
4
{
5
    audio_stop_sound(mus_mew)
6
    global.dunes_flag[25] = true
7
    if (keyboard_multicheck_pressed(0) || keyboard_multicheck_pressed(1))
8
        room_restart()
9
    return;
10
}
11
if arcade_game_over
12
{
13
    if (keyboard_multicheck_pressed(0) || keyboard_multicheck_pressed(1))
14
    {
15
        audio_sound_gain(mus_mew_boss, 1, 0)
16
        audio_sound_gain(mus_mew, 1, 0)
17
        global.last_room_overworld = room
18
        room_restart()
19
    }
20
    return;
21
}
22
var x_min = 90
23
var x_max = 225
24
var y_min = 60
25
var y_max = 140
26
if (arcade_boss == false)
27
{
28
    if (irandom(arcade_prnd[0]) == 1)
29
    {
30
        instance_create(random_range(x_min, x_max), 40, obj_arcade_enemy)
31
        arcade_prnd[0] = 180
32
    }
33
    else if (arcade_prnd[0] > 3)
34
        arcade_prnd[0] -= 3
35
    if (irandom(arcade_prnd[1]) == 1)
36
    {
37
        instance_create(choose((x_min - 40), (x_max + 40)), random_range(y_min, y_max), obj_arcade_ghost)
38
        arcade_prnd[1] = 220
39
    }
40
    else if (arcade_prnd[1] > 3)
41
        arcade_prnd[1] -= 3
42
}
43
if (arcade_boss == true)
44
{
45
    if (irandom(arcade_prnd[2]) == 1)
46
    {
47
        instance_create(random_range(x_min, x_max), 40, obj_arcade_upgrade)
48
        arcade_prnd[2] = 1000
49
    }
50
    else
51
        arcade_prnd[2] -= 1
52
}
53
if ((!audio_is_playing(mus_mew_intro)) && (!audio_is_playing(mus_mew)))
54
{
55
    audio_play_sound(mus_mew, 1, 1)
56
    audio_sound_gain(mus_mew, 1, 0)
57
}
58
if (arcade_score >= arcade_upgrade_score)
59
{
60
    arcade_upgrade_score += (arcade_upgrade_score + 50)
61
    instance_create(random_range(x_min, x_max), 40, obj_arcade_upgrade)
62
}
63
if (arcade_score >= arcade_miniboss_score && (!arcade_boss))
64
{
65
    arcade_miniboss_score += (arcade_miniboss_score + 100)
66
    arcade_boss = true
67
    instance_create(160, 0, obj_arcade_swordsman)
68
}
69
if (arcade_score >= arcade_boss_score && (!arcade_boss))
70
{
71
    arcade_boss_score += (arcade_boss_score + 500)
72
    arcade_miniboss_score += 500
73
    arcade_boss = true
74
    audio_sound_gain(mus_mew, 0, 2000)
75
    alarm[2] = 90
alarm[2]

instance_create(160, 0, obj_arcade_boss) audio_stop_sound(mus_mew) audio_play_sound(mus_mew_boss, 1, 1)
76
}