Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_axis_energy_ball_pulse_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (image_index >= 11 && move_noloop == false)
4
{
5
    speed = move_speed
6
    move_noloop = true
7
}
8
var battle_box = obj_dialogue_box_battle_transformation_any
9
if (image_alpha < 0.99)
10
    image_alpha = lerp(image_alpha, 1, 0.25)
11
else
12
    image_alpha = 1
13
if place_meeting(x, y, obj_battle_enemy_attack_axis_shield)
14
{
15
    if instance_exists(obj_battlebox_controller_axis)
16
        obj_battlebox_controller_axis.axis_trash_meter = clamp((obj_battlebox_controller_axis.axis_trash_meter + 10), 0, 100)
17
    obj_battle_enemy_attack_axis_shield.shield_hit = true
18
    var shield = obj_battle_enemy_attack_axis_shield
19
    instance_create_depth((shield.x + (lengthdir_x(6, shield.direction))), (shield.y + (lengthdir_y(6, shield.direction))), depth, obj_battle_enemy_attack_axis_energy_ball_boss_destroy_effect)
20
    instance_destroy()
21
}
22
var hurt_player = false
23
if (obj_heart_battle_fighting_axis.movement_mode == 1)
24
{
25
    if (bbox_bottom >= battle_box.bbox_bottom)
26
        hurt_player = true
27
}
28
else if collision_rectangle((battle_box.x - 5), (battle_box.y - 5), (battle_box.x + 5), (battle_box.y + 5), id, false, false)
29
    hurt_player = true
30
if hurt_player
31
{
32
    instance_destroy(self, false)
33
    instance_create_depth(320, 320, -100, obj_battle_enemy_attack_axis_energy_ball_explosion)
34
}
35
if (speed > 0)
36
    speed -= 1
37
else
38
    speed = 0