Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_penilla_pencil_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
    return;
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
    x += lengthdir_x(move_speed, angle)
20
    y += lengthdir_y(move_speed, angle)
21
    instance_create(x, y, obj_battle_enemy_attack_penilla_drawing)
22
}
23
if (place_meeting(x, y, obj_dialogue_box_battle_transformation_any) && in_box == false)
24
    in_box = true
25
if ((!(place_meeting(x, y, obj_dialogue_box_battle_transformation_any))) && in_box == true)
26
{
27
    if (image_alpha > 0)
28
    {
29
        image_alpha -= 0.1
30
        if (image_alpha < 0)
31
            image_alpha = 0
32
        if (image_alpha == 0)
33
            instance_destroy()
34
    }
35
}