Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_heart_main_screen_shop_geno_Step_0

(view raw script w/o annotations or w/e)
1
var main_shop_screen_number = global.main_shop_screen_number
2
script_execute(gml_Script_scr_controls_shop_main)
3
if key_select
4
{
5
    audio_play_sound(snd_confirm, 1, 0)
6
    if (main_shop_screen_number == 1)
7
    {
8
        global.buy_shop_screen_number = 1
9
        global.player_response = 0
10
        global.able_to_buy = 0
11
        instance_create(0, 0, obj_text_item_buy_shop)
12
        instance_create((obj_main_screen_shop.x + 19), (obj_main_screen_shop.y + 19), obj_heart_buy_screen_shop_geno)
13
        event_user(0)
14
        return;
15
    }
16
    else if (main_shop_screen_number == 2)
17
    {
18
        if (global.shop_name == "Steamworks Vendy Geno")
19
            audio_play_sound(snd_fail, 1, 0)
20
        else
21
        {
22
            instance_create(0, 120, obj_talk_screen_shop)
23
            instance_create(0, 0, obj_dialogue_steal_shop)
24
            event_user(0)
25
            return;
26
        }
27
    }
28
    else if (main_shop_screen_number == 3)
29
    {
30
        instance_create(0, 0, obj_shop_fade_out_screen)
31
        scr_audio_fade_out
scr_audio_fade_out

function scr_audio_fade_out(argument0, argument1) //gml_Script_scr_audio_fade_out { var snd = argument0 var fade_len = argument1 if (!audio_is_playing(snd)) return false; audio_sound_gain(snd, 0, fade_len) if instance_exists(obj_audio_fade_helper) { with (obj_audio_fade_helper) { if (audio_to_fade == snd) return false; } } with (instance_create(0, 0, obj_audio_fade_helper)) audio_to_fade = snd }
(obj_shop_generator.shop_audio, 1300)
32
        instance_destroy()
33
    }
34
}
35
if (key_select == 0)
36
{
37
    if (key_down && key_up == 0)
38
    {
39
        if (main_shop_screen_number == 3)
40
        {
41
            global.main_shop_screen_number = 1
42
            main_shop_screen_number = global.main_shop_screen_number
43
        }
44
        else
45
            global.main_shop_screen_number += 1
46
        audio_play_sound(snd_mainmenu_select, 1, 0)
47
    }
48
    if (key_up && key_down == 0)
49
    {
50
        if (main_shop_screen_number == 1)
51
        {
52
            global.main_shop_screen_number = 3
53
            main_shop_screen_number = global.main_shop_screen_number
54
        }
55
        else
56
            global.main_shop_screen_number -= 1
57
        audio_play_sound(snd_mainmenu_select, 1, 0)
58
    }
59
}
60
main_shop_screen_number = global.main_shop_screen_number
61
if (main_shop_screen_number == 1)
62
{
63
    x = obj_main_screen_shop.x + 229
64
    y = obj_main_screen_shop.y + 19
65
}
66
else if (main_shop_screen_number == 2)
67
{
68
    x = obj_main_screen_shop.x + 229
69
    y = obj_main_screen_shop.y + 39
70
}
71
else if (main_shop_screen_number == 3)
72
{
73
    x = obj_main_screen_shop.x + 229
74
    y = obj_main_screen_shop.y + 59
75
}
76
else if (main_shop_screen_number == 4)
77
{
78
    x = obj_main_screen_shop.x + 229
79
    y = obj_main_screen_shop.y + 79
80
}