Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_el_bailador_neutral_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
event_user(0)
4
if (enemy_dead == true)
5
{
6
    x = starting_point_x
7
    y = starting_point_y
8
    image_xscale = starting_point_xscale
9
    image_yscale = starting_point_yscale
10
    instance_create(starting_point_x, starting_point_y, obj_el_bailador_dead)
11
    instance_destroy()
12
    return;
13
}
14
else if (enemy_spared == true)
15
{
16
    sprite_index = spr_el_bailador_spared
17
    x = starting_point_x
18
    y = starting_point_y
19
    image_xscale = starting_point_xscale
20
    image_yscale = starting_point_yscale
21
    image_speed = 0
22
    image_index = 0
23
    image_alpha = 0.5
24
    if (no_loop_create_clouds == false)
25
    {
26
        for (i = 0; i <= 11; i += 1)
27
            instance_create(x, (y - 22), obj_spare_cloud)
28
    }
29
    no_loop_create_clouds = true
30
}
31
if (damage_disjoint_count > 0)
32
    damage_disjoint_count -= 1
33
else if (enemy_dead == false && enemy_spared == false)
34
{
35
    if (global.current_hp_enemy <= 0)
36
        sprite_index = spr_el_bailador_dead
37
    else if (global.enemy_low_hp == true && global.current_hp_enemy < global.max_hp_enemy)
38
        sprite_index = neutral_sprite
39
    else
40
        sprite_index = neutral_sprite
41
}
42
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false)
43
{
44
    time_elapsed = 0
45
    sign_modifier = 1
46
    damage_disjoint_count = 12
47
    no_loop_damage_disjoint_count = true
48
}
49
else if (!instance_exists(obj_text_damage_count))
50
    no_loop_damage_disjoint_count = false
51
if (damage_disjoint_count == 12)
52
    damage_disjoint_x = -50
53
else if (damage_disjoint_count == 10)
54
    damage_disjoint_x = 50
55
else if (damage_disjoint_count == 8)
56
    damage_disjoint_x = -20
57
else if (damage_disjoint_count == 6)
58
    damage_disjoint_x = 20
59
else if (damage_disjoint_count == 4)
60
    damage_disjoint_x = -10
61
else if (damage_disjoint_count == 2)
62
    damage_disjoint_x = 10
63
else if (damage_disjoint_count == 0)
64
    damage_disjoint_x = 0
65
x = draw_position_x + damage_disjoint_x
66
y = draw_position_y + damage_disjoint_y
67
image_xscale = starting_point_xscale
68
image_yscale = starting_point_yscale
69
if ((!((instance_exists(obj_text_damage_count) && global.fight_number == 1))) && enemy_dead == false && enemy_spared == false && image_alpha > 0)
70
{
71
    game_maker_cannot_do_math = power((time_elapsed / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2)
72
    animation_disjoint_yscale = sign_modifier * (max_rise - game_maker_cannot_do_math)
73
    time_elapsed += time_increase
74
    if (time_elapsed >= time_max)
75
    {
76
        time_elapsed = 0
77
        sign_modifier = (-sign_modifier)
78
    }
79
    image_yscale = draw_position_yscale + animation_disjoint_yscale
80
    image_xscale = draw_position_xscale - animation_disjoint_yscale * (max_rise_ext / max_rise)
81
    animating = true
82
}
83
else
84
    animating = false