Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_martlet_ff_2_final_feather_Step_0

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