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 = 3154;
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
    {
21
        cooldown_timer -= 1;
22
    }
23
    else
24
    {
25
        cooldown_timer = cooldown_timer_max;
26
        is_active = false;
27
        image_alpha = 1;
28
        image_xscale = 1;
29
        image_yscale = 1;
30
    }
31
}
32
else if (y > (battle_box.bbox_bottom + 10))
33
{
34
    image_alpha -= 0.2;
35
    if (image_alpha <= 0)
36
        instance_destroy();
37
}
38
else if (image_alpha < 1)
39
{
40
    image_alpha += 0.25;
41
}