Undertale Yellow script viewer

← back to main script listing

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