Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_flowey_1_attack_6_tear_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
var box = obj_dialogue_box_battle_transformation_any
4
image_angle = direction + 90
5
if (vspeed > vsp_max)
6
    vspeed = vsp_max
7
if (bbox_bottom >= box.bbox_bottom && vspeed > 0)
8
{
9
    if (stage < 3)
10
    {
11
        if (stage == 1)
12
            var child_number = 2
13
        else
14
            child_number = 3
15
        for (var i = 0; i < child_number; i++)
16
        {
17
            with (instance_create_depth(x, (y - 10), -100, obj_flowey_1_attack_6_tear))
18
            {
19
                stage = other.stage + 1
20
                if (stage == 2)
21
                    sprite_index = spr_attack_crying_flowey_tear_medium
22
                else
23
                    sprite_index = spr_attack_crying_flowey_tear_small
24
                var dir_offset = 10
25
                direction = 90 - dir_offset + i * (dir_offset * 2 / (child_number - 1))
26
                if (stage == 2)
27
                    speed = 6
28
                if (stage == 3)
29
                    speed = 7
30
                image_angle = direction + 90
31
            }
32
        }
33
    }
34
    instance_destroy()
35
}