Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_froggit_intro_head_yellow_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
if (enemy_dead == false && enemy_spared == false)
4
    image_alpha = global.image_alpha_enemy_attacking
5
if (enemy_dead == true)
6
{
7
    instance_destroy()
8
    return;
9
}
10
if (damage_disjoint_count > 0)
11
    damage_disjoint_count -= 1
12
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false)
13
{
14
    image_speed = 0
15
    image_index = 0
16
    path_position = 0
17
    damage_disjoint_count = 12
18
    no_loop_damage_disjoint_count = true
19
}
20
else if (!instance_exists(obj_text_damage_count))
21
    no_loop_damage_disjoint_count = false
22
if (damage_disjoint_count == 12)
23
    damage_disjoint_x = -50
24
else if (damage_disjoint_count == 10)
25
    damage_disjoint_x = 50
26
else if (damage_disjoint_count == 8)
27
    damage_disjoint_x = -20
28
else if (damage_disjoint_count == 6)
29
    damage_disjoint_x = 20
30
else if (damage_disjoint_count == 4)
31
    damage_disjoint_x = -10
32
else if (damage_disjoint_count == 2)
33
    damage_disjoint_x = 10
34
else if (damage_disjoint_count == 0)
35
    damage_disjoint_x = 0
36
if (damage_disjoint_count > 0 || global.current_hp_enemy <= 0)
37
    image_alpha = 0
38
x = draw_position_x + damage_disjoint_x
39
y = draw_position_y + damage_disjoint_y
40
if ((!((instance_exists(obj_text_damage_count) && global.fight_number == 1))) && enemy_dead == false && enemy_spared == false)
41
    image_speed = image_speed_default