Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_jandroid_garbage_Step_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
if (vspeed > vspeed_max)
4
    vspeed = vspeed_max;
5
var box = 3154;
6
if ((bbox_bottom + vspeed) >= (box.bbox_bottom - 3))
7
{
8
    y = box.bbox_bottom - 3 - (sprite_height * 0.5);
9
    vspeed = -vspeed * 0.7;
10
    if (abs(vspeed) < 0.15)
11
        vspeed = 0;
12
    if (bounce_noloop == false)
13
    {
14
        hspeed = choose(-2, 2);
15
        bounce_noloop = true;
16
    }
17
}
18
if ((bbox_left + hspeed) <= (box.bbox_left + 3) || (bbox_right + hspeed) >= (box.bbox_right - 3))
19
{
20
    hspeed = -hspeed * 0.8;
21
    if (abs(hspeed) < 0.15)
22
        hspeed = 0;
23
}
24
if (fade_out == true)
25
{
26
    if (image_alpha > 0)
27
        image_alpha -= 0.1;
28
    else
29
        instance_destroy();
30
}