Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_insomnitot_star_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
        var random_pitch = irandom_range(-1, 1)
16
        audio_play_sound(snd_stars, 20, 0)
17
        audio_sound_pitch(snd_stars, (1 + random_pitch * 0.3))
18
    }
19
}
20
if (can_move == true)
21
{
22
    ds_list_add(x_list, x)
23
    ds_list_add(y_list, y)
24
    ds_list_add(in_box_list, in_box)
25
    while (ds_list_size(x_list) > max_points_trail)
26
    {
27
        ds_list_delete(x_list, 0)
28
        ds_list_delete(y_list, 0)
29
        ds_list_delete(in_box_list, 0)
30
    }
31
}
32
if (can_move == true)
33
{
34
    x += lengthdir_x(move_speed, angle)
35
    y += lengthdir_y(move_speed, angle)
36
    if (move_speed < move_speed_max)
37
    {
38
        move_speed += move_speed_increase
39
        if (move_speed > move_speed_max)
40
            move_speed = move_speed_max
41
    }
42
}
43
var return_in_box = script_execute(gml_Script_scr_determine_if_in_battle_box)
44
if (return_in_box == true && in_box == false)
45
    in_box = true
46
if ((!(place_meeting(x, y, obj_dialogue_box_battle_transformation_any))) && in_box == true && out_box == false)
47
{
48
    alarm[0] = 30
alarm[0]

instance_destroy()
49
    out_box = true
50
}