Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_heart_battle_fighting_parent_Other_13

(view raw script w/o annotations or w/e)
1
if instance_exists(obj_heart_hitbox_parent)
2
{
3
    with (obj_heart_hitbox_parent)
4
        instance_destroy()
5
}
6
if instance_exists(obj_heart_battle_effect_parent)
7
{
8
    with (obj_heart_battle_effect_parent)
9
        instance_destroy()
10
}
11
if (moveable == true && global.current_sp_self > 0)
12
    global.current_sp_self -= 1
13
if (global.current_rp_self > 0)
14
{
15
    global.current_rp_self -= 1
16
    audio_play_sound(snd_battle_item_eat, 20, false)
17
    if (global.current_hp_self > global.max_hp_self)
18
        return;
19
    global.current_hp_self += 15
20
    if (global.current_hp_self > global.max_hp_self)
21
        global.current_hp_self = global.max_hp_self
22
}