Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_heart_battle_fighting_parent_Other_15

(view raw script w/o annotations or w/e)
1
audio_play_sound(snd_battle_item_eat, 20, false)
2
with (obj_heart_hitbox_parent.collide_id)
3
{
4
    heart_collided = true
5
    instance_destroy()
6
}
7
if (global.current_hp_self > global.max_hp_self)
8
    return;
9
if (damage_number == 1)
10
    global.current_hp_self += damage
11
else if (damage_number == 2)
12
    global.current_hp_self += damage_2
13
else if (damage_number == 3)
14
    global.current_hp_self += damage_3
15
if (global.current_hp_self > global.max_hp_self)
16
    global.current_hp_self = global.max_hp_self