Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_martlet_ff_2_feather_Step_0

(view raw script w/o annotations or w/e)
1
if (image_alpha < 1 && can_fade_in == true)
2
{
3
    image_alpha += 0.2
4
    if (image_alpha > 1)
5
        image_alpha = 1
6
    if (image_alpha == 1)
7
        can_fade_in = false
8
}
9
var can_trail = false
10
trail_cc_current += 1
11
if (trail_cc_current >= trail_cc_max)
12
{
13
    can_trail = true
14
    trail_cc_current = 0
15
}
16
if (can_trail == true)
17
{
18
    ds_list_add(x_list, x)
19
    ds_list_add(y_list, y)
20
    ds_list_add(angle_list, image_angle)
21
    while (ds_list_size(x_list) > max_points_trail)
22
    {
23
        ds_list_delete(x_list, 0)
24
        ds_list_delete(y_list, 0)
25
        ds_list_delete(angle_list, 0)
26
    }
27
}
28
feather_radius += feather_radius_increase
29
feather_angle += feather_angle_increase
30
if (feather_angle >= 360)
31
    feather_angle -= 360
32
else if (feather_angle < 0)
33
    feather_angle += 360
34
x = x_center + feather_radius * cos(degtorad(feather_angle))
35
y = y_center - feather_radius * sin(degtorad(feather_angle))
36
if (feather_radius != 0)
37
    image_angle = point_direction(x, y, x_center, y_center)
38
if (feather_radius < 0)
39
    image_angle += 180
40
if (feather_radius > fai_radius_min)
41
{
42
    if (abs(feather_angle_increase) > abs(feather_angle_min))
43
        feather_angle_increase += feather_angle_decrease
44
}
45
else if (abs(feather_angle_increase) < abs(feather_angle_max))
46
    feather_angle_increase -= feather_angle_decrease
47
if (place_meeting(x, y, obj_dialogue_box_battle_transformation_any) && in_box == false)
48
    in_box = true
49
if ((!(place_meeting(x, y, obj_dialogue_box_battle_transformation_any))) && in_box == true)
50
{
51
    if (can_fade_out == false)
52
    {
53
        global.id_store = id
54
        can_fade_out_temp = true
55
        for (i = 0; i < obj_battle_enemy_attack_martlet_ff_2_checker.feather_create_max; i++)
56
        {
57
            with (obj_battle_enemy_attack_martlet_ff_2_checker.id_feather[feather_count][i])
58
            {
59
                if (!(((!(place_meeting(x, y, obj_dialogue_box_battle_transformation_any))) && in_box == true)))
60
                {
61
                    with (global.id_store)
62
                        can_fade_out_temp = false
63
                }
64
            }
65
        }
66
        can_fade_out = can_fade_out_temp
67
    }
68
    if (can_fade_out == true)
69
    {
70
        if (image_alpha > 0)
71
        {
72
            image_alpha -= 0.1
73
            if (image_alpha < 0)
74
                image_alpha = 0
75
            if (image_alpha == 0)
76
                instance_destroy()
77
        }
78
    }
79
}