Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_bowll_tail_a_Step_0

(view raw script w/o annotations or w/e)
1
var enemy_dead = global.enemy_dead
2
var enemy_spared = global.enemy_spared
3
if (enemy_dead == false && enemy_spared == false)
4
    image_alpha = global.image_alpha_enemy_attacking
5
if (enemy_dead == true)
6
{
7
    instance_destroy()
8
    return;
9
}
10
else if (enemy_spared == true)
11
{
12
    instance_destroy()
13
    return;
14
}
15
if (damage_disjoint_count > 0)
16
    damage_disjoint_count -= 1
17
else if (enemy_dead == false && enemy_spared == false && damage_disjoint_count <= 0)
18
{
19
    if (global.enemy_low_hp == true && global.current_hp_enemy < global.max_hp_enemy)
20
    {
21
        if (sprite_index != spr_bowll_tail_critical)
22
        {
23
            sprite_index = spr_bowll_tail_critical
24
            image_speed = 0
25
            image_index = 0
26
        }
27
    }
28
    else if (sprite_index != spr_bowll_tail_normal)
29
    {
30
        sprite_index = spr_bowll_tail_normal
31
        image_speed = image_speed_tail
32
        image_index = 0
33
    }
34
}
35
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false)
36
{
37
    damage_disjoint_count = 12
38
    no_loop_damage_disjoint_count = true
39
}
40
else if (!instance_exists(obj_text_damage_count))
41
    no_loop_damage_disjoint_count = false
42
if (damage_disjoint_count == 12)
43
    damage_disjoint_x = -50
44
else if (damage_disjoint_count == 10)
45
    damage_disjoint_x = 50
46
else if (damage_disjoint_count == 8)
47
    damage_disjoint_x = -20
48
else if (damage_disjoint_count == 6)
49
    damage_disjoint_x = 20
50
else if (damage_disjoint_count == 4)
51
    damage_disjoint_x = -10
52
else if (damage_disjoint_count == 2)
53
    damage_disjoint_x = 10
54
else if (damage_disjoint_count == 0)
55
    damage_disjoint_x = 0
56
if (damage_disjoint_count > 0 || global.current_hp_enemy <= 0)
57
    image_alpha = 0