Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_axis_geno_7_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 = -4
6
switch scene
7
{
8
    case 0:
9
        for (var i = 0; i < bullet_number_max; i++)
10
        {
11
            if (timer == floor(i * (360 / bullet_number_max / bullet_speed)))
12
            {
13
                var bullet = instance_create_depth(battle_box.x, (battle_box.y - bullet_distance), -1100, obj_battle_enemy_attack_axis_turret_circling_geno)
14
                bullet.bullet_speed = bullet_speed * bullet_spin_dir
15
                bullet.attack_dir = bullet_attack_dir
16
                bullet.bullet_spawner = id
17
                bullet.attack_distance = bullet_distance
18
                bullet_number_current += 1
19
            }
20
        }
21
        if (bullet_number_current >= bullet_number_max)
22
            scene += 1
23
        timer += 1
24
        break
25
    case 1:
26
        cutscene_wait(0.5)
27
        break
28
    case 2:
29
        bullet_distance -= 3
30
        with (obj_battle_enemy_attack_axis_turret_circling_geno)
31
            attack_distance = other.bullet_distance
32
        if (bullet_distance <= bullet_distance_min)
33
            scene++
34
        break
35
    case 3:
36
        audio_play_sound(snd_bullet_warning, 1, 0)
37
        with (obj_battle_enemy_attack_axis_turret_circling_geno)
38
        {
39
            image_xscale = 1.5
40
            image_yscale = 1.5
41
            bullet_speed = 0
42
            can_track = false
43
        }
44
        scene++
45
        break
46
    case 4:
47
        bullet_distance -= 1
48
        cutscene_wait(0.25)
49
        break
50
    case 5:
51
        with (obj_battle_enemy_attack_axis_turret_circling_geno)
52
        {
53
            image_speed = 1
54
            scene = 1
55
        }
56
        scene++
57
        break
58
    case 6:
59
        if (!instance_exists(obj_battle_enemy_attack_axis_turret_circling_geno))
60
        {
61
            attack_count -= 1
62
            if (attack_count <= 0)
63
                instance_destroy()
64
            else
65
            {
66
                timer = 0
67
                scene = 0
68
                bullet_number_current = 0
69
                bullet_distance = 100
70
                bullet_attack_dir = irandom_range(1, 360)
71
                bullet_spin_dir = choose(-1, 1)
72
            }
73
        }
74
        break
75
}