Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_axis_bomb_1_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
if (image_alpha < 1)
5
    image_alpha += 0.1
6
else if (noloop == false)
7
{
8
    gravity = 0.8
9
    vspeed = -14
10
    hspeed = 3
11
    if (x > 320)
12
        hspeed *= -1
13
    noloop = true
14
}
15
var hurt_player = false
16
if (noloop == true)
17
{
18
    if place_meeting(x, y, obj_battle_enemy_attack_axis_shield)
19
    {
20
        if instance_exists(obj_battlebox_controller_axis)
21
            obj_battlebox_controller_axis.axis_trash_meter = clamp((obj_battlebox_controller_axis.axis_trash_meter + 10), 0, 100)
22
        obj_battle_enemy_attack_axis_shield.shield_hit = true
23
        var shield = obj_battle_enemy_attack_axis_shield
24
        y = shield.bbox_top - 5
25
        vspeed = -10
26
        destroy_check = true
27
    }
28
    hurt_player = false
29
    if (obj_heart_battle_fighting_axis.movement_mode == 1)
30
    {
31
        if (bbox_bottom >= battle_box.bbox_bottom && vspeed > 0)
32
            hurt_player = true
33
    }
34
    else if collision_rectangle((battle_box.x - 5), (battle_box.y - 5), (battle_box.x + 5), (battle_box.y + 5), id, false, false)
35
        hurt_player = true
36
}
37
if hurt_player
38
{
39
    instance_destroy(self, false)
40
    instance_create_depth(320, 320, -100, obj_battle_enemy_attack_axis_energy_ball_explosion)
41
}
42
if (destroy_check == true && vspeed > 0)
43
    instance_destroy()