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 = 3154;
4
var ball_offset = 30;
5
var bomb = -4;
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
        var 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
        var 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
        var 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
if (bomb != -4)
42
{
43
    if (bomb.x < battle_box.bbox_left)
44
        bomb.gravity_direction = 0;
45
    if (bomb.x > battle_box.bbox_right)
46
        bomb.gravity_direction = 180;
47
    if (bomb.y > battle_box.bbox_bottom)
48
        bomb.gravity_direction = 90;
49
    if (bomb.y < battle_box.bbox_top)
50
        bomb.gravity_direction = 270;
51
}
52
attack_tick += 1;