Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_text_use_item_selection_pause_screen_overworld_Create_0

(view raw script w/o annotations or w/e)
1
depth = (-room_height) - global.depth_overworld_text_normal
2
global.item_use_hold = id
3
item_slot = global.item_slot[global.item_pause_screen_number]
4
game_mode = global.game_mode
5
item_category = "nothing"
6
item_type = "nothing"
7
item_number = 0
8
item_sound = snd_battle_item_eat
9
con_keep_previous = true
10
con_message_number = 1
11
if (game_mode == "customs")
12
{
13
    if (item_slot == "Hot Dog...?")
14
    {
15
        message[0] = "* You eat the " + string(item_slot)
16
        message[1] = "#* Your HP was maxed out."
17
    }
18
}
19
else if (game_mode == "yellow")
20
    script_execute(gml_Script_scr_item_use_text_yellow)
21
if (item_type == "weapon")
22
{
23
    var item_hold = global.player_weapon
24
    global.player_weapon = global.item_slot[global.item_pause_screen_number]
25
    global.item_slot[global.item_pause_screen_number] = item_hold
26
    global.player_weapon_attack = script_execute(gml_Script_scr_determine_weapon_attack)
27
    audio_play_sound(item_sound, 20, 0)
28
}
29
else if (item_type == "armor")
30
{
31
    item_hold = global.player_armor
32
    global.player_armor = global.item_slot[global.item_pause_screen_number]
33
    global.item_slot[global.item_pause_screen_number] = item_hold
34
    global.player_armor_defense = script_execute(gml_Script_scr_determine_armor_defense)
35
    audio_play_sound(item_sound, 20, 0)
36
}
37
else if (item_type == "ammo")
38
{
39
    item_hold = global.player_weapon_modifier
40
    global.player_weapon_modifier = global.item_slot[global.item_pause_screen_number]
41
    global.item_slot[global.item_pause_screen_number] = item_hold
42
    global.player_weapon_modifier_attack = script_execute(gml_Script_scr_determine_weapon_modifier_attack)
43
    audio_play_sound(item_sound, 20, 0)
44
}
45
else if (item_type == "accessory")
46
{
47
    item_hold = global.player_armor_modifier
48
    global.player_armor_modifier = global.item_slot[global.item_pause_screen_number]
49
    global.item_slot[global.item_pause_screen_number] = item_hold
50
    global.player_armor_modifier_defense = script_execute(gml_Script_scr_determine_armor_modifier_defense)
51
    audio_play_sound(item_sound, 20, 0)
52
}
53
message_current = 0
54
message_end = array_length_1d(message) - 1
55
message_draw = ""
56
increase = global.text_speed
57
characters = 0
58
hold = 0
59
message_length = string_length(message[message_current])
60
no_loop = false
61
script_execute(gml_Script_scr_generate_text_counters)