Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_petal_generator_phase_2_Step_0

(view raw script w/o annotations or w/e)
1
if (fade_out == true)
2
{
3
    if (image_alpha > 0.01)
4
        image_alpha = lerp(image_alpha, 0, 0.1)
5
    else
6
        image_alpha = 0
7
}
8
else if (image_alpha < 0.99)
9
    image_alpha = lerp(image_alpha, 1, 0.1)
10
else
11
    image_alpha = 1
12
if (!petals_enabled)
13
{
14
    with (obj_petal)
15
        instance_destroy()
16
    return;
17
}
18
cood_x = irandom_range(-10, (room_width + 10))
19
current_delay++
20
if (current_delay == generation_speed)
21
{
22
    current_delay = 0
23
    instance_create_depth(cood_x, cood_y, choose(999, 999, 0), spawned_object)
24
}