Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_talking_hotel_shopkeeper

(view raw script w/o annotations or w/e)
1
function scr_talking_hotel_shopkeeper
scr_talking_hotel_shopkeeper

function scr_talking_hotel_shopkeeper() //gml_Script_scr_talking_hotel_shopkeeper { var message_og_length = string_length(message[message_current]) if (characters > message_og_length && characters < message_length) { if ((!(variable_instance_exists(id, "message_pause_noloop"))) || message_pause_noloop < message_current) { message_pause_noloop = message_current message_wait_timer = 5 } if (variable_instance_exists(id, "message_wait_timer") && message_wait_timer > 0 && message_og_length > 0) { message_wait_timer -= 1 characters -= 1 return; } } show_debug_message(current_char) switch current_char { case " ": case "*": break default: audio_stop_sound(snd_talk_default) audio_play_sound(snd_talk_default, 20, false) } switch current_char { case ".": case ",": case "?": case "!": break default: can_talk = true } }
() //gml_Script_scr_talking_hotel_shopkeeper
2
{
3
    var message_og_length = string_length(message[message_current])
4
    if (characters > message_og_length && characters < message_length)
5
    {
6
        if ((!(variable_instance_exists(id, "message_pause_noloop"))) || message_pause_noloop < message_current)
7
        {
8
            message_pause_noloop = message_current
9
            message_wait_timer = 5
10
        }
11
        if (variable_instance_exists(id, "message_wait_timer") && message_wait_timer > 0 && message_og_length > 0)
12
        {
13
            message_wait_timer -= 1
14
            characters -= 1
15
            return;
16
        }
17
    }
18
    show_debug_message(current_char)
19
    switch current_char
20
    {
21
        case " ":
22
        case "*":
23
            break
24
        default:
25
            audio_stop_sound(snd_talk_default)
26
            audio_play_sound(snd_talk_default, 20, false)
27
    }
28
29
    switch current_char
30
    {
31
        case ".":
32
        case ",":
33
        case "?":
34
        case "!":
35
            break
36
        default:
37
            can_talk = true
38
    }
39
40
}