Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_flowey_battle_gray_hand_Other_76

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (ds_map_find_value(event_data, "event_type") == "sprite event")
4
{
5
    if (layer_instance_get_instance(ds_map_find_value(event_data, "element_id")) == id)
6
    {
7
        switch ds_map_find_value(event_data, "message")
8
        {
9
            case "fire_pellets":
10
                if (x < 0 || x > 640)
11
                    return;
12
                var pellet_number = 9
13
                pellet_multiplier = 360 / pellet_number
14
                for (var i = 0; i < pellet_number; i++)
15
                {
16
                    var pellet = instance_create_depth(x, y, (depth - 1), obj_flowey_battle_phase_2_gray_pellet)
17
                    pellet.direction = pellet_multiplier * i
18
                    pellet.speed = 14
19
                }
20
                break
21
        }
22
23
    }
24
}