Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_know_cone_hand_left_b_Step_0

(view raw script w/o annotations or w/e)
1
var enemy_dead_2 = global.enemy_dead_2
2
var enemy_spared_2 = global.enemy_spared_2
3
if (enemy_dead_2 == false && enemy_spared_2 == false)
4
    image_alpha = global.image_alpha_enemy_attacking
5
if (enemy_dead_2 == true)
6
{
7
    instance_destroy()
8
    return;
9
}
10
else if (enemy_spared_2 == true)
11
{
12
    instance_destroy()
13
    return;
14
}
15
if (damage_disjoint_count > 0)
16
    damage_disjoint_count -= 1
17
else if (enemy_dead_2 == false && enemy_spared_2 == false)
18
{
19
    if (global.enemy_low_hp_2 == true && global.current_hp_enemy_2 < global.max_hp_enemy_2)
20
        sprite_index = spr_know_cone_hand_left
21
    else
22
        sprite_index = spr_know_cone_hand_left
23
}
24
if (instance_exists(obj_text_damage_count) && global.fight_number == 2 && no_loop_damage_disjoint_count == false)
25
{
26
    damage_disjoint_count = 12
27
    no_loop_damage_disjoint_count = true
28
}
29
else if (!instance_exists(obj_text_damage_count))
30
    no_loop_damage_disjoint_count = false
31
if (damage_disjoint_count == 12)
32
    damage_disjoint_x = -50
33
else if (damage_disjoint_count == 10)
34
    damage_disjoint_x = 50
35
else if (damage_disjoint_count == 8)
36
    damage_disjoint_x = -20
37
else if (damage_disjoint_count == 6)
38
    damage_disjoint_x = 20
39
else if (damage_disjoint_count == 4)
40
    damage_disjoint_x = -10
41
else if (damage_disjoint_count == 2)
42
    damage_disjoint_x = 10
43
else if (damage_disjoint_count == 0)
44
    damage_disjoint_x = 0
45
if (damage_disjoint_count > 0 || global.current_hp_enemy_2 <= 0)
46
    image_alpha = 0
47
x = draw_position_x + damage_disjoint_x
48
y = draw_position_y + damage_disjoint_y