Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_martlet_attack_block_arrow_static_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
var battle_box = obj_dialogue_box_battle_transformation_any
4
image_index = arrow_dir / 90
5
if (place_meeting(x, y, obj_heart_battle_fighting_parent) && (!is_active))
6
{
7
    is_active = true
8
    audio_play_sound(snd_battle_item_eat, 1, 0)
9
    obj_heart_battle_fighting_parent.turn_angle_target = arrow_dir
10
}
11
if (is_active == true)
12
{
13
    if (image_alpha > 0)
14
    {
15
        image_xscale += 0.25
16
        image_yscale += 0.25
17
        image_alpha -= 0.1
18
    }
19
    if (cooldown_timer > 0)
20
        cooldown_timer -= 1
21
    else
22
    {
23
        cooldown_timer = cooldown_timer_max
24
        is_active = false
25
        image_alpha = 1
26
        image_xscale = 1
27
        image_yscale = 1
28
    }
29
}
30
else if (y > (battle_box.bbox_bottom + 10))
31
{
32
    image_alpha -= 0.2
33
    if (image_alpha <= 0)
34
        instance_destroy()
35
}
36
else if (image_alpha < 1)
37
    image_alpha += 0.25