Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_know_cone_ball_b_Step_0

(view raw script w/o annotations or w/e)
1
var enemy_dead_2 = global.enemy_dead_2
2
var enemy_spared_2 = global.enemy_spared_2
3
if (enemy_dead_2 == false && enemy_spared_2 == false)
4
    image_alpha = global.image_alpha_enemy_attacking
5
if (enemy_dead_2 == true)
6
{
7
    x = starting_point_x
8
    y = starting_point_y
9
    global.id_store = id
10
    instance_create(starting_point_x, starting_point_y, obj_know_cone_ball_dead)
11
    instance_destroy()
12
    return;
13
}
14
else if (enemy_spared_2 == true)
15
{
16
    x = starting_point_x
17
    y = starting_point_y
18
    image_alpha = 0.5
19
}
20
if (damage_disjoint_count > 0)
21
    damage_disjoint_count -= 1
22
else if (enemy_dead_2 == false && enemy_spared_2 == false)
23
{
24
    if (global.enemy_low_hp_2 == true && global.current_hp_enemy_2 < global.max_hp_enemy_2)
25
        sprite_index = spr_know_cone_ball_critical
26
    else
27
        sprite_index = spr_know_cone_ball
28
}
29
if (instance_exists(obj_text_damage_count) && global.fight_number == 2 && no_loop_damage_disjoint_count == false)
30
{
31
    damage_disjoint_count = 12
32
    no_loop_damage_disjoint_count = true
33
}
34
else if (!instance_exists(obj_text_damage_count))
35
    no_loop_damage_disjoint_count = false
36
if (damage_disjoint_count == 12)
37
    damage_disjoint_x = -50
38
else if (damage_disjoint_count == 10)
39
    damage_disjoint_x = 50
40
else if (damage_disjoint_count == 8)
41
    damage_disjoint_x = -20
42
else if (damage_disjoint_count == 6)
43
    damage_disjoint_x = 20
44
else if (damage_disjoint_count == 4)
45
    damage_disjoint_x = -10
46
else if (damage_disjoint_count == 2)
47
    damage_disjoint_x = 10
48
else if (damage_disjoint_count == 0)
49
    damage_disjoint_x = 0
50
if (damage_disjoint_count > 0 || global.current_hp_enemy_2 <= 0)
51
{
52
}
53
x = draw_position_x + damage_disjoint_x
54
y = draw_position_y + damage_disjoint_y