Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_bowll_silverware_all_Step_0

(view raw script w/o annotations or w/e)
1
y += (move_speed * dir)
2
if (fade_state == 0)
3
{
4
    image_alpha += fade_speed
5
    if (image_alpha >= 1)
6
    {
7
        image_alpha = 1
8
        fade_state = 1
9
        center_dist = box.y - y
10
    }
11
}
12
if (fade_state == 2)
13
{
14
    image_alpha -= fade_speed
15
    if (image_alpha <= 0)
16
        instance_destroy()
17
}
18
if (fade_state == 1)
19
{
20
    var dist_temp = box.y - y
21
    if (abs(dist_temp) >= abs(center_dist) && (sign(dist_temp) != sign(center_dist) || sign(center_dist) == 0))
22
        fade_state = 2
23
}