Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_flowey_battle_mechanical_spawner_drone_attack_Create_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
spawner = noone
4
side = choose(-1, 1)
5
if (instance_number(obj_flowey_battle_phase_2_mechanical_drone) == 1)
6
{
7
    spawner = 2892
8
    if (spawner.x < 320)
9
        side = -1
10
    else
11
        side = 1
12
}
13
else
14
{
15
    with (obj_flowey_battle_phase_2_mechanical_drone)
16
    {
17
        if (x < 320 && other.side == -1)
18
            other.spawner = self
19
        else if (x >= 320 && other.side == 1)
20
            other.spawner = self
21
    }
22
}
23
if (spawner == -4)
24
    instance_destroy()
25
bullet_count = 7
26
bullet_delay = 2
27
scene = 0
28
cutscene_timer = 0
29
switch side
30
{
31
    case -1:
32
        spawn_dir = 315
33
        spawn_dir_arc = 60
34
        spawn_dir_inc = spawn_dir_arc / bullet_count
35
        spawn_dir_current = spawn_dir - bullet_count * 0.5 * spawn_dir_inc
36
        break
37
    case 1:
38
        spawn_dir = 225
39
        spawn_dir_arc = 60
40
        spawn_dir_inc = (-((spawn_dir_arc / bullet_count)))
41
        spawn_dir_current = spawn_dir + bullet_count * 0.5 * (-spawn_dir_inc)
42
        break
43
}