Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_mail_drop_Step_0

(view raw script w/o annotations or w/e)
1
if (destroy_self_noloop && (!global.dialogue_open))
2
{
3
    instance_destroy()
4
    return;
5
}
6
scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
7
with (msg)
8
{
9
    if (other.current_mail == "Steamworks ID" || other.current_mail == "Martlet's Letter")
10
    {
11
        message[0] = "* You cannot drop the#  " + other.current_mail + "."
12
        other.destroy_self_noloop = true
13
        return;
14
    }
15
    message[0] = "* Are you sure you want to#  drop the mail?"
16
    ch_msg = 0
17
    ch[1] = "Yes"
18
    ch[2] = "No"
19
    if (outcome == 1)
20
    {
21
        scr_mail_remove
scr_mail_remove

function scr_mail_remove(argument0) //gml_Script_scr_mail_remove { var old_pos = ds_list_find_index(global.mail_list, argument0) ds_list_delete(global.mail_list, old_pos) scr_mail_sort() }
(other.current_mail)
22
        instance_destroy(other)
23
    }
24
    if (outcome == 2)
25
        instance_destroy(other)
26
}