Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_frostermit_pincher_right_2_Other_10

(view raw script w/o annotations or w/e)
1
x_offset = 22 * (cos(degtorad(obj_battle_enemy_attack_frostermit_pincher_right_1.image_angle + 34)))
2
y_offset = 22 * (sin(degtorad(obj_battle_enemy_attack_frostermit_pincher_right_1.image_angle + 34)))
3
x = obj_battle_enemy_attack_frostermit_pincher_right_1.x + x_offset
4
y = obj_battle_enemy_attack_frostermit_pincher_right_1.y - y_offset
5
var state = obj_battle_enemy_attack_frostermit_pincher_right_1.state
6
if (state == "normal")
7
    image_angle = (point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y)) + 10
8
else if (state == "detract")
9
    no_loop_r = false
10
else if (state == "retract")
11
{
12
    if (no_loop_r == false)
13
    {
14
        base_angle_diff = abs(obj_battle_enemy_attack_frostermit_pincher_right_1.image_angle_d_location - obj_battle_enemy_attack_frostermit_pincher_right_1.image_angle_r_location)
15
        image_angle_r = image_angle
16
        no_loop_r = true
17
    }
18
    var image_angle_r_location = (point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y)) + 10
19
    var base_angle_r = obj_battle_enemy_attack_frostermit_pincher_right_1.image_angle_r
20
    var base_angle_r_location = obj_battle_enemy_attack_frostermit_pincher_right_1.image_angle_r_location
21
    var base_dividend = 1 - (abs((base_angle_r_location - base_angle_r) / base_angle_diff))
22
    image_angle = image_angle_r + (image_angle_r_location - image_angle_r) * base_dividend
23
}
24
image_alpha = obj_battle_enemy_attack_frostermit_pincher_right_1.image_alpha