Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_background_battle_parent_Step_0

(view raw script w/o annotations or w/e)
1
if (custom_fade_direction == "out")
2
{
3
    if (image_alpha > custom_fade_alpha)
4
        image_alpha -= custom_fade_rate;
5
}
6
else if (custom_fade_direction == "in")
7
{
8
    if (image_alpha < global.image_alpha_enemy_attacking)
9
    {
10
        image_alpha += custom_fade_rate;
11
        if (image_alpha >= global.image_alpha_enemy_attacking)
12
            custom_fade_direction = "nothing";
13
    }
14
}
15
else
16
{
17
    image_alpha = global.image_alpha_enemy_attacking;
18
}
19
event_user(1);