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
    exit;
13
    image_alpha = 0.5;
14
}
15
else if (enemy_spared_2 == true)
16
{
17
    x = starting_point_x;
18
    y = starting_point_y;
19
    image_alpha = 0.5;
20
}
21
if (damage_disjoint_count > 0)
22
{
23
    damage_disjoint_count -= 1;
24
}
25
else if (enemy_dead_2 == false && enemy_spared_2 == false)
26
{
27
    if (global.enemy_low_hp_2 == true && global.current_hp_enemy_2 < global.max_hp_enemy_2)
28
        sprite_index = spr_know_cone_ball_critical;
29
    else
30
        sprite_index = spr_know_cone_ball;
31
}
32
if (instance_exists(obj_text_damage_count) && global.fight_number == 2 && no_loop_damage_disjoint_count == false)
33
{
34
    damage_disjoint_count = 12;
35
    no_loop_damage_disjoint_count = true;
36
}
37
else if (!instance_exists(obj_text_damage_count))
38
{
39
    no_loop_damage_disjoint_count = false;
40
}
41
if (damage_disjoint_count == 12)
42
    damage_disjoint_x = -50;
43
else if (damage_disjoint_count == 10)
44
    damage_disjoint_x = 50;
45
else if (damage_disjoint_count == 8)
46
    damage_disjoint_x = -20;
47
else if (damage_disjoint_count == 6)
48
    damage_disjoint_x = 20;
49
else if (damage_disjoint_count == 4)
50
    damage_disjoint_x = -10;
51
else if (damage_disjoint_count == 2)
52
    damage_disjoint_x = 10;
53
else if (damage_disjoint_count == 0)
54
    damage_disjoint_x = 0;
55
if (damage_disjoint_count > 0 || global.current_hp_enemy_2 <= 0)
56
{
57
}
58
x = draw_position_x + damage_disjoint_x;
59
y = draw_position_y + damage_disjoint_y;