Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_cactony_arm_right_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)
18
{
19
    if (global.enemy_low_hp == true && global.current_hp_enemy < global.max_hp_enemy)
20
        sprite_index = spr_cactony_arm_right_critical
21
    else
22
        sprite_index = spr_cactony_arm_right_normal
23
}
24
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && 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 <= 0)
46
    image_alpha = 0