Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_flowey_battle_gray_spawner_guns_Alarm_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (spawn_direction < 180)
4
    spawn_direction = irandom_range(180, 360)
5
else
6
    spawn_direction = irandom_range(0, 180)
7
spawn_x = lengthdir_x(spawn_distance, spawn_direction)
8
spawn_y = lengthdir_y(spawn_distance, spawn_direction)
9
instance_create_depth((soul.x + spawn_x), (soul.y + spawn_y), (depth - 1), obj_flowey_battle_gray_gun)
10
if (spawn_number > 0)
11
{
12
    alarm[0] = spawn_delay
alarm[0]

if live_call() return global.live_result; if (spawn_direction < 180) spawn_direction = irandom_range(180, 360) else spawn_direction = irandom_range(0, 180) spawn_x = lengthdir_x(spawn_distance, spawn_direction) spawn_y = lengthdir_y(spawn_distance, spawn_direction) instance_create_depth((soul.x + spawn_x), (soul.y + spawn_y), (depth - 1), obj_flowey_battle_gray_gun) if (spawn_number > 0) { alarm[0] = spawn_delay spawn_number-- } else instance_destroy()
13
    spawn_number--
14
}
15
else
16
    instance_destroy()