Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_tellyvis_body_a_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
var enemy_dead = global.enemy_dead
4
var enemy_spared = global.enemy_spared
5
var enemy_sparing = global.enemy_sparing
6
if (enemy_dead == false && enemy_spared == false)
7
    image_alpha = global.image_alpha_enemy_attacking
8
if (enemy_dead == true)
9
{
10
    x = starting_point_x
11
    y = starting_point_y
12
    image_xscale = starting_point_xscale
13
    image_yscale = starting_point_yscale
14
    instance_create(starting_point_x, starting_point_y, obj_tellyvis_dead)
15
    instance_destroy()
16
    return;
17
}
18
else if (enemy_spared == true)
19
{
20
    tellyvis_draw_face = false
21
    sprite_index = spr_tellyvis_body
22
    x = starting_point_x
23
    y = starting_point_y
24
    image_xscale = starting_point_xscale
25
    image_yscale = starting_point_yscale
26
    image_speed = 0
27
    image_index = 0
28
    image_alpha = 0.5
29
    if (no_loop_create_clouds == false)
30
    {
31
        for (i = 0; i <= 11; i += 1)
32
            instance_create(x, (y - 22), obj_spare_cloud)
33
    }
34
    no_loop_create_clouds = true
35
}
36
if (damage_disjoint_count > 0)
37
    damage_disjoint_count -= 1
38
else if (enemy_dead == false && enemy_spared == false && damage_disjoint_count <= 0 && (!instance_exists(obj_battle_enemy_attack_tellyvis_remote_generator)))
39
{
40
    if (global.enemy_low_hp == true && global.current_hp_enemy < global.max_hp_enemy)
41
    {
42
        sprite_index = spr_tellyvis_low_hp
43
        tellyvis_face_default = spr_tellyvis_face_sad
44
    }
45
    else if ((enemy_sparing == true && global.enemy_attacking == false) || (enemy_sparing == false && global.action_3_selected_count >= 1))
46
    {
47
        sprite_index = spr_tellyvis_body
48
        tellyvis_face_default = spr_tellyvis_face_smug
49
    }
50
    else if (!instance_exists(obj_battle_enemy_attack_tellyvis_remote_generator))
51
        sprite_index = spr_tellyvis_body
52
}
53
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false)
54
{
55
    time_elapsed = 0
56
    sign_modifier = 1
57
    damage_disjoint_count = 12
58
    no_loop_damage_disjoint_count = true
59
}
60
else if (!instance_exists(obj_text_damage_count))
61
    no_loop_damage_disjoint_count = false
62
if (damage_disjoint_count == 12)
63
    damage_disjoint_x = -50
64
else if (damage_disjoint_count == 10)
65
    damage_disjoint_x = 50
66
else if (damage_disjoint_count == 8)
67
    damage_disjoint_x = -20
68
else if (damage_disjoint_count == 6)
69
    damage_disjoint_x = 20
70
else if (damage_disjoint_count == 4)
71
    damage_disjoint_x = -10
72
else if (damage_disjoint_count == 2)
73
    damage_disjoint_x = 10
74
else if (damage_disjoint_count == 0)
75
    damage_disjoint_x = 0
76
if (damage_disjoint_count > 0 || global.current_hp_enemy <= 0)
77
    sprite_index = spr_tellyvis_body
78
x = draw_position_x + damage_disjoint_x
79
y = draw_position_y + damage_disjoint_y
80
image_xscale = starting_point_xscale
81
image_yscale = starting_point_yscale
82
if (global.action_1_selected_count >= 1 && enemy_sparing == true && global.enemy_attacking == true && global.enemy_low_hp == false)
83
{
84
    if (tellyvis_face_default != spr_tellyvis_face_dance)
85
        tellyvis_face_default = spr_tellyvis_face_dance
86
}
87
if (tellyvis_face_change == true && tellyvis_face_current != spr_tellyvis_face_switch)
88
{
89
    tellyvis_face_frame = 0
90
    tellyvis_face_current = spr_tellyvis_face_switch
91
}
92
else if ((tellyvis_face_current != tellyvis_face_next && tellyvis_face_change == false) || tellyvis_face_next_stored != tellyvis_face_next)
93
{
94
    tellyvis_face_next_stored = tellyvis_face_next
95
    tellyvis_face_change = true
96
    alarm[0] = 10
alarm[0]

tellyvis_face_current = tellyvis_face_next tellyvis_face_change = false tellyvis_face_frame = 0
97
}
98
if ((!instance_exists(obj_quote_bubble_battle)) && tellyvis_face_current != tellyvis_face_default && tellyvis_face_next != tellyvis_face_default)
99
    tellyvis_face_next = tellyvis_face_default
100
if (tellyvis_face_frame < sprite_get_number(tellyvis_face_current))
101
    tellyvis_face_frame += 0.3
102
else
103
    tellyvis_face_frame = 0