Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_el_bailador_whiteout_Step_0

(view raw script w/o annotations or w/e)
1
if (fade_out == false)
2
{
3
    image_alpha = lerp(image_alpha, 1, 0.1)
4
    if (image_alpha >= 0.99 && no_loop == false)
5
    {
6
        image_alpha = 1
7
        alarm[0] = 10
alarm[0]

if instance_exists(obj_dialogue_battle_flee) { switch global.enemy_count { case 1: if (global.enemy_dead == false) global.enemy_exp = 0 global.player_exp += global.enemy_exp global.player_gold += global.enemy_gold break case 2: if (global.enemy_dead == false) global.enemy_exp = 0 if (global.enemy_dead_2 == false) global.enemy_exp_2 = 0 global.player_exp += (global.enemy_exp + global.enemy_exp_2) global.player_gold += (global.enemy_gold + global.enemy_gold_2) break case 3: if (global.enemy_dead == false) global.enemy_exp = 0 if (global.enemy_dead_2 == false) global.enemy_exp_2 = 0 if (global.enemy_dead_3 == false) global.enemy_exp_3 = 0 global.player_exp += (global.enemy_exp + global.enemy_exp_2 + global.enemy_exp_3) global.player_gold += (global.enemy_gold + global.enemy_gold_2 + global.enemy_gold_3) break } if (global.player_exp >= global.player_exp_next[global.player_level]) { var i = global.player_level while (i <= 20) { if (global.player_exp >= global.player_exp_next[i]) { global.player_level = i + 1 global.max_hp_self = global.player_hp_next[i] global.player_attack = global.player_attack_next[i] global.player_defense = global.player_defense_next[i] i += 1 continue } else break } } } obj_pl.image_alpha = 1 if (global.party_member != noone) global.party_member.image_alpha = 1 scr_cutscene_end() room_goto(asset_get_index(global.current_room_overworld)) fade_out = true
8
        no_loop = true
9
    }
10
}
11
else
12
{
13
    image_alpha = lerp(image_alpha, 0, 0.15)
14
    if (image_alpha <= 0.05 && no_loop == false)
15
    {
16
        image_alpha = 0
17
        instance_destroy()
18
    }
19
}