Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_froggit_intro_body_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
    x = starting_point_x
8
    y = starting_point_y
9
    image_xscale = starting_point_xscale
10
    image_yscale = starting_point_yscale
11
    instance_create(starting_point_x, starting_point_y, obj_froggit_intro_dead_yellow)
12
    instance_destroy()
13
    return;
14
}
15
if (damage_disjoint_count > 0)
16
    damage_disjoint_count -= 1
17
else if (enemy_dead == false && enemy_spared == false)
18
    sprite_index = spr_froggit_body
19
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false)
20
{
21
    image_speed = 0
22
    image_index = 0
23
    damage_disjoint_count = 12
24
    no_loop_damage_disjoint_count = true
25
}
26
else if (!instance_exists(obj_text_damage_count))
27
    no_loop_damage_disjoint_count = false
28
if (damage_disjoint_count == 12)
29
    damage_disjoint_x = -50
30
else if (damage_disjoint_count == 10)
31
    damage_disjoint_x = 50
32
else if (damage_disjoint_count == 8)
33
    damage_disjoint_x = -20
34
else if (damage_disjoint_count == 6)
35
    damage_disjoint_x = 20
36
else if (damage_disjoint_count == 4)
37
    damage_disjoint_x = -10
38
else if (damage_disjoint_count == 2)
39
    damage_disjoint_x = 10
40
else if (damage_disjoint_count == 0)
41
    damage_disjoint_x = 0
42
if (damage_disjoint_count > 0 || global.current_hp_enemy <= 0)
43
    sprite_index = spr_froggit_defeated
44
x = draw_position_x + damage_disjoint_x
45
y = draw_position_y + damage_disjoint_y
46
if ((!((instance_exists(obj_text_damage_count) && global.fight_number == 1))) && enemy_dead == false && enemy_spared == false)
47
    image_speed = image_speed_default