Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_axis_geno_5_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
var ball_offset = 30
5
var bomb = noone
6
switch attack_tick
7
{
8
    case 30:
9
        var ball = instance_create_depth((battle_box.bbox_left - 10), (battle_box.bbox_top - 10), -100, obj_battle_enemy_attack_axis_energy_ball_boss_geno)
10
        ball.alarm[0] = 30
11
        ball.direction = 315
12
        break
13
    case 60:
14
        ball = instance_create_depth((battle_box.bbox_right + 10), (battle_box.bbox_top - 10), -100, obj_battle_enemy_attack_axis_energy_ball_boss_geno)
15
        ball.alarm[0] = 30
16
        ball.direction = 225
17
        break
18
    case 125:
19
        bomb = instance_create_depth((battle_box.bbox_left - 30), battle_box.y, -100, obj_battle_enemy_attack_axis_bomb_geno)
20
        break
21
    case 160:
22
        ball = instance_create_depth((battle_box.bbox_right + 20), battle_box.y, -100, obj_battle_enemy_attack_axis_energy_ball_boss_geno)
23
        ball.alarm[0] = 60
24
        ball.direction = 180
25
        break
26
    case 180:
27
        ball = instance_create_depth((battle_box.x + 30), (battle_box.bbox_top - 20), -100, obj_battle_enemy_attack_axis_energy_ball_boss_geno)
28
        ball.alarm[0] = 60
29
        ball.direction = 225
30
        ball = instance_create_depth((battle_box.x + 30), (battle_box.bbox_bottom + 20), -100, obj_battle_enemy_attack_axis_energy_ball_boss_geno)
31
        ball.alarm[0] = 60
32
        ball.direction = 135
33
        break
34
    case 215:
35
        bomb = instance_create_depth(battle_box.x, (battle_box.bbox_top - 20), -100, obj_battle_enemy_attack_axis_bomb_geno)
36
        break
37
    case 280:
38
        instance_destroy()
39
        break
40
}
41
42
if (bomb != noone)
43
{
44
    if (bomb.x < battle_box.bbox_left)
45
        bomb.gravity_direction = 0
46
    if (bomb.x > battle_box.bbox_right)
47
        bomb.gravity_direction = 180
48
    if (bomb.y > battle_box.bbox_bottom)
49
        bomb.gravity_direction = 90
50
    if (bomb.y < battle_box.bbox_top)
51
        bomb.gravity_direction = 270
52
}
53
attack_tick += 1