Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_flier_swarm_horizontal_parent_Step_0

(view raw script w/o annotations or w/e)
1
if (image_alpha < 1 && can_move == false)
2
{
3
    image_alpha += 0.1;
4
    if (image_alpha > 1)
5
        image_alpha = 1;
6
    if (image_alpha == 1)
7
    {
8
        image_speed = 0.5;
9
        can_move = true;
10
    }
11
}
12
if (can_move == true)
13
{
14
    game_maker_cannot_do_math = power((time_elapsed / ((time_max / 2) * (1 / sqrt(max_rise)))) - sqrt(max_rise), 2);
15
    animation_disjoint_y = sign_modifier * (max_rise - round(game_maker_cannot_do_math));
16
    time_elapsed += time_increase;
17
    if (time_elapsed >= time_max)
18
    {
19
        time_elapsed = 0;
20
        sign_modifier = -sign_modifier;
21
    }
22
    y = starting_position_y + animation_disjoint_y;
23
    animation_disjoint_x += x_speed;
24
    x = round(starting_position_x + animation_disjoint_x);
25
    if (place_meeting(x, y, obj_dialogue_box_battle_transformation_any))
26
        can_vanish = true;
27
    if (!place_meeting(x, y, obj_dialogue_box_battle_transformation_any) && can_vanish == true)
28
    {
29
        if (image_alpha > 0)
30
        {
31
            image_alpha -= 0.1;
32
            if (image_alpha < 0)
33
                image_alpha = 0;
34
            if (image_alpha == 0)
35
                instance_destroy();
36
        }
37
    }
38
}