Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_flowey_battle_organic_bloodcell_spawner_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (organic_spawn_chance_current > 1)
4
    organic_spawn_chance_current--
5
var rng = irandom(organic_spawn_chance_current)
6
if (rng == 1)
7
{
8
    organic_spawn_chance_current = organic_spawn_chance_max
9
    var cell = instance_create_depth(choose(-60, 700), irandom_range(-60, 540), -100, obj_flowey_battle_phase_2_organic_bloodcell)
10
    cell.direction = (point_direction(cell.x, cell.y, 320, 240)) + (irandom_range(-45, 45))
11
}