Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_determine_enemy_music_yellow

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

function scr_determine_enemy_music_yellow() { var current_world_value = script_execute(scr_determine_world_value_yellow); var battle_mus = 124; switch (current_world_value) { case 0: battle_mus = 124; break; case 1: battle_mus = 124; break; case 2: battle_mus = 162; break; case 3: battle_mus = 513; break; case 4: battle_mus = 208; break; } if (global.sound_carry_overworld == false) { if (global.kill_number[current_world_value] <= 7) { if (global.kill_number[current_world_value] > 0) { audio_sound_gain(mus_genobattle_yellow, 1, 0); audio_play_sound(mus_genobattle_yellow, 20, true); var mus_pitch = (global.kill_number[current_world_value] / 7) * 10 * 0.1; audio_sound_pitch(mus_genobattle_yellow, mus_pitch); } else { audio_sound_gain(mus_nobodycame_yellow, 1, 0); audio_play_sound(mus_nobodycame_yellow, 20, true); } } else { audio_sound_gain(battle_mus, 1, 0); audio_sound_pitch(battle_mus, 1); audio_play_sound(battle_mus, 20, true); } } }
()
2
{
3
    var current_world_value = script_execute(scr_determine_world_value_yellow);
4
    var battle_mus = 124;
5
    switch (current_world_value)
6
    {
7
        case 0:
8
            battle_mus = 124;
9
            break;
10
        case 1:
11
            battle_mus = 124;
12
            break;
13
        case 2:
14
            battle_mus = 162;
15
            break;
16
        case 3:
17
            battle_mus = 513;
18
            break;
19
        case 4:
20
            battle_mus = 208;
21
            break;
22
    }
23
    if (global.sound_carry_overworld == false)
24
    {
25
        if (global.kill_number[current_world_value] <= 7)
26
        {
27
            if (global.kill_number[current_world_value] > 0)
28
            {
29
                audio_sound_gain(mus_genobattle_yellow, 1, 0);
30
                audio_play_sound(mus_genobattle_yellow, 20, true);
31
                var mus_pitch = (global.kill_number[current_world_value] / 7) * 10 * 0.1;
32
                audio_sound_pitch(mus_genobattle_yellow, mus_pitch);
33
            }
34
            else
35
            {
36
                audio_sound_gain(mus_nobodycame_yellow, 1, 0);
37
                audio_play_sound(mus_nobodycame_yellow, 20, true);
38
            }
39
        }
40
        else
41
        {
42
            audio_sound_gain(battle_mus, 1, 0);
43
            audio_sound_pitch(battle_mus, 1);
44
            audio_play_sound(battle_mus, 20, true);
45
        }
46
    }
47
}