Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_train_choice_Step_0

(view raw script w/o annotations or w/e)
1
if selection_confirmed
2
{
3
    instance_destroy()
4
    return;
5
}
6
if (fade_out == true)
7
{
8
    if (draw_alpha > 0)
9
        draw_alpha -= 0.15
10
    else
11
        selection_confirmed = true
12
    return;
13
}
14
if (draw_alpha < 1)
15
{
16
    draw_alpha += 0.15
17
    return;
18
}
19
if global.right_keyp
20
{
21
    if (selection == 0)
22
        selection = 1
23
    else
24
        selection = 0
25
    audio_play_sound(snd_mainmenu_select, 1, 0)
26
}
27
if global.left_keyp
28
{
29
    if (selection == 1)
30
        selection = 0
31
    else
32
        selection = 1
33
    audio_play_sound(snd_mainmenu_select, 1, 0)
34
}
35
if (keyboard_multicheck_pressed(0) || train_timer == 0)
36
{
37
    audio_play_sound(snd_confirm, 1, 0)
38
    fade_out = true
39
}
40
if (train_timer > 0)
41
    train_timer -= 1