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
    exit;
9
    image_alpha = 0.5;
10
}
11
else if (enemy_spared == true)
12
{
13
    instance_destroy();
14
    exit;
15
}
16
if (damage_disjoint_count > 0)
17
{
18
    damage_disjoint_count -= 1;
19
}
20
else if (enemy_dead == false && enemy_spared == false && damage_disjoint_count <= 0)
21
{
22
    if (global.enemy_low_hp == true && global.current_hp_enemy < global.max_hp_enemy)
23
    {
24
        if (sprite_index != spr_bowll_tail_critical)
25
        {
26
            sprite_index = spr_bowll_tail_critical;
27
            image_speed = 0;
28
            image_index = 0;
29
        }
30
    }
31
    else if (sprite_index != spr_bowll_tail_normal)
32
    {
33
        sprite_index = spr_bowll_tail_normal;
34
        image_speed = image_speed_tail;
35
        image_index = 0;
36
    }
37
}
38
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false)
39
{
40
    damage_disjoint_count = 12;
41
    no_loop_damage_disjoint_count = true;
42
}
43
else if (!instance_exists(obj_text_damage_count))
44
{
45
    no_loop_damage_disjoint_count = false;
46
}
47
if (damage_disjoint_count == 12)
48
    damage_disjoint_x = -50;
49
else if (damage_disjoint_count == 10)
50
    damage_disjoint_x = 50;
51
else if (damage_disjoint_count == 8)
52
    damage_disjoint_x = -20;
53
else if (damage_disjoint_count == 6)
54
    damage_disjoint_x = 20;
55
else if (damage_disjoint_count == 4)
56
    damage_disjoint_x = -10;
57
else if (damage_disjoint_count == 2)
58
    damage_disjoint_x = 10;
59
else if (damage_disjoint_count == 0)
60
    damage_disjoint_x = 0;
61
if (damage_disjoint_count > 0 || global.current_hp_enemy <= 0)
62
    image_alpha = 0;