Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_ceroba_arc_checker_Step_0

(view raw script w/o annotations or w/e)
1
var counter_timer_max = -1
2
switch counter_current
3
{
4
    case 0:
5
        var dir_inc = 180 / bullet_spawn_number
6
        for (var i = bullet_spawn_number; i > 0; i--)
7
        {
8
            var dir_current = bullet_spawn_direction - 180 + dir_inc * i
9
            var xx = 320 + (lengthdir_x(bullet_spawn_distance, dir_current))
10
            var yy = 320 + (lengthdir_y(bullet_spawn_distance, dir_current))
11
            var new_bullet = instance_create(xx, yy, obj_battle_enemy_attack_ceroba_arc_diamond)
12
            new_bullet.bullet_distance = bullet_spawn_distance
13
            new_bullet.bullet_dir_current = dir_current
14
        }
15
        counter_current++
16
        break
17
    case 1:
18
        counter_timer_max = 300
19
        break
20
    case 2:
21
        instance_destroy()
22
        break
23
}
24
25
if (counter_timer == -1 && counter_timer_max != -1)
26
    counter_timer = counter_timer_max
27
if (counter_timer > 0)
28
    counter_timer--
29
else if (counter_timer != -1)
30
{
31
    counter_timer = -1
32
    counter_current += 1
33
}
34
with (obj_battle_enemy_attack_ceroba_arc_diamond)
35
{
36
    if (image_alpha >= 1)
37
    {
38
        part_emitter_region(other.part_diamond_sys, other.part_diamond_em, x, x, y, y, 0, 0)
39
        part_emitter_burst(other.part_diamond_sys, other.part_diamond_em, other.part_diamond_trail, 1)
40
    }
41
}