Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_rorrim_sparkle_Step_0

(view raw script w/o annotations or w/e)
1
if (!instance_exists(obj_dialogue_box_battle_transformation_any))
2
{
3
    instance_destroy();
4
    exit;
5
}
6
if (image_alpha < 1 && can_move == false)
7
{
8
    image_alpha += 0.1;
9
    if (image_alpha > 1)
10
        image_alpha = 1;
11
    if (image_alpha == 1)
12
    {
13
        angle = point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y);
14
        can_move = true;
15
    }
16
}
17
if (can_move == true)
18
{
19
    distance = distance_to_object(obj_dialogue_box_battle_transformation_any);
20
    move_speed_current = round(move_speed * (1 - (distance / distance_max)));
21
    if (move_speed_current < 1)
22
        move_speed_current = 1;
23
    x += lengthdir_x(move_speed_current, angle);
24
    y += lengthdir_y(move_speed_current, angle);
25
    image_angle += image_angle_increase;
26
    if (instance_exists(obj_dialogue_box_battle_transformation_any))
27
    {
28
        if (distance_to_object(obj_dialogue_box_battle_transformation_any) >= distance_max)
29
            angle = point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y);
30
    }
31
}