Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_frostermit_pincher_right_1_Step_0

(view raw script w/o annotations or w/e)
1
if (!instance_exists(obj_heart_battle_fighting_parent))
2
{
3
    instance_destroy()
4
    return;
5
}
6
if (image_alpha < 1)
7
{
8
    image_alpha += 0.1
9
    if (image_alpha > 1)
10
        image_alpha = 1
11
}
12
if (state == "normal")
13
{
14
    game_maker_cannot_do_math = power((time_elapsed / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2)
15
    animation_disjoint_angle = sign_modifier * (max_rise - round(game_maker_cannot_do_math))
16
    time_elapsed += time_increase
17
    if (time_elapsed >= time_max)
18
    {
19
        time_elapsed = 0
20
        sign_modifier = (-sign_modifier)
21
    }
22
    image_angle = image_angle_n + animation_disjoint_angle
23
}
24
else if (state == "detract")
25
{
26
    if (no_loop_t == false)
27
    {
28
        if (detract_counter == 1)
29
        {
30
            image_angle_d = image_angle
31
            image_angle_d_location = image_angle_d + detract_charge_factor
32
            image_angle_d_location_2 = point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y)
33
            image_angle_r_location = image_angle
34
            image_angle_d_speed = image_angle_d_speed_1
35
            no_loop_t = true
36
        }
37
        else if (detract_counter == 2)
38
        {
39
            image_angle_d = image_angle
40
            image_angle_d_location = image_angle_d_location_2
41
            image_angle_d_speed = image_angle_d_speed_2
42
            no_loop_t = true
43
        }
44
    }
45
    image_angle_d += (image_angle_d_speed * (sign(image_angle_d_location - image_angle_d)))
46
    if (abs(image_angle_d_location - image_angle_d) < image_angle_d_speed)
47
        image_angle_d = image_angle_d_location
48
    if (image_angle_d == image_angle_d_location)
49
    {
50
        if (detract_counter == 1)
51
        {
52
            detract_counter += 1
53
            no_loop_t = false
54
        }
55
        else if (detract_counter == 2)
56
        {
57
            detract_counter = 1
58
            image_angle_r = image_angle_d
59
            state = "retract"
60
            no_loop_t = false
61
        }
62
    }
63
    image_angle = image_angle_d
64
}
65
else if (state == "retract")
66
{
67
    image_angle_r += (image_angle_r_speed * (sign(image_angle_r_location - image_angle_r)))
68
    if (abs(image_angle_r_location - image_angle_r) < image_angle_r_speed)
69
        image_angle_r = image_angle_r_location
70
    if (image_angle_r == image_angle_r_location)
71
        state = "normal"
72
    image_angle = image_angle_r
73
}
74
with (obj_battle_enemy_attack_frostermit_pincher_right_2)
75
    event_user(0)
76
with (obj_battle_enemy_attack_frostermit_pincher_right_3_outer)
77
    event_user(0)
78
with (obj_battle_enemy_attack_frostermit_pincher_right_3_inner)
79
    event_user(0)