Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_flier_fire_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
        can_move = true
8
}
9
if (instance_exists(obj_dialogue_box_battle_transformation_any) && no_loop_switch_y == false)
10
{
11
    if (y >= (obj_dialogue_box_battle_transformation_any.y - 4) && y <= (obj_dialogue_box_battle_transformation_any.y + 4))
12
    {
13
        starting_position_y = y
14
        max_rise_y /= 2
15
        time_elapsed_y = 0
16
        time_increase_y *= 2
17
        no_loop_switch_y = true
18
    }
19
}
20
if (can_move == true)
21
{
22
    if (object_index != obj_battle_enemy_attack_flier_fire_middle)
23
    {
24
        game_maker_cannot_do_math_x = power((time_elapsed_x / (time_max_x / 2 * (1 / sqrt(max_rise_x))) - sqrt(max_rise_x)), 2)
25
        animation_disjoint_x = sign_modifier_x * (max_rise_x - round(game_maker_cannot_do_math_x))
26
        time_elapsed_x += time_increase_x
27
        if (time_elapsed_x >= time_max_x)
28
        {
29
            time_elapsed_x = 0
30
            sign_modifier_x = (-sign_modifier_x)
31
        }
32
        x = starting_position_x + animation_disjoint_x
33
    }
34
    else
35
        x = starting_position_x
36
    game_maker_cannot_do_math_y = power((time_elapsed_y / (time_max_y / 2 * (1 / sqrt(max_rise_y))) - sqrt(max_rise_y)), 2)
37
    animation_disjoint_y = sign_modifier_y * (max_rise_y - round(game_maker_cannot_do_math_y))
38
    time_elapsed_y += time_increase_y
39
    if (time_elapsed_y >= time_max_y)
40
    {
41
        time_elapsed_y = 0
42
        sign_modifier_y = (-sign_modifier_y)
43
    }
44
    y = starting_position_y + animation_disjoint_y
45
}