Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_axis_body_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (global.current_hp_enemy <= 0)
4
{
5
    if (!death_sprite)
6
        death_sprite = true
7
}
8
if (death_sprite == true && death_noloop == false)
9
{
10
    death_noloop = true
11
    sprite_index = spr_axis_body_nocharge
12
    image_index = 0
13
    alarm[0] = 45
alarm[0]

instance_create(380, 74, obj_quote_bubble_battle_yellow_3) instance_create_depth(0, 0, -708, obj_quote_battle_axis_death)
14
    image_alpha = 1
15
}
16
if (sprite_index == spr_axis_body_nocharge)
17
{
18
    if instance_exists(obj_target_bar_battle)
19
        global.enemy_sparing = true
20
    else
21
        global.enemy_sparing = false
22
}
23
if (global.enemy_dead == false && global.enemy_spared == false)
24
    image_alpha = global.image_alpha_enemy_attacking
25
if (damage_disjoint_count > 0)
26
    damage_disjoint_count -= 1
27
if (((instance_exists(obj_text_damage_count) && global.fight_number == 1 && global.attacking_damage_stat > 0) || axis_damaged_act == true) && no_loop_damage_disjoint_count == false)
28
{
29
    if (!death_sprite)
30
        sprite_index = spr_axis_body_hurt
31
    damage_disjoint_count = 12
32
    no_loop_damage_disjoint_count = true
33
    if (instance_exists(obj_text_damage_count) && obj_battlebox_controller_axis.axis_trash_meter >= 100)
34
    {
35
        obj_axis_body.axis_damaged_act = true
36
        obj_battlebox_controller_axis.axis_trash_meter = 0
37
        obj_battlebox_controller_axis.axis_hit_count_current -= 1
38
        global.special_action_count += 1
39
        global.enemy_mode += 1
40
        global.attack_repeat = 0
41
    }
42
}
43
else if ((!instance_exists(obj_text_damage_count)) && axis_damaged_act == false)
44
    no_loop_damage_disjoint_count = false
45
if (damage_disjoint_count == 12)
46
    damage_disjoint_x = -50
47
else if (damage_disjoint_count == 10)
48
    damage_disjoint_x = 50
49
else if (damage_disjoint_count == 8)
50
    damage_disjoint_x = -20
51
else if (damage_disjoint_count == 6)
52
    damage_disjoint_x = 20
53
else if (damage_disjoint_count == 4)
54
    damage_disjoint_x = -10
55
else if (damage_disjoint_count == 2)
56
    damage_disjoint_x = 10
57
else if (damage_disjoint_count == 0)
58
{
59
    damage_disjoint_x = 0
60
    if (axis_damaged_act == true)
61
        axis_damaged_act = false
62
    if (sprite_index == spr_axis_body_hurt)
63
        sprite_index = base_sprite
64
}
65
if (death_sprite == true)
66
    x = starting_point_x + damage_disjoint_x
67
else if (!instance_exists(obj_battle_enemy_attack_super_ball_1_creator))
68
    x = (lerp(x, starting_point_x, 0.15)) + damage_disjoint_x