Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_enemy_attack_know_cone_oranges_stars

(view raw script w/o annotations or w/e)
1
function scr_enemy_attack_know_cone_oranges_stars
scr_enemy_attack_know_cone_oranges_stars

function scr_enemy_attack_know_cone_oranges_stars() //gml_Script_scr_enemy_attack_know_cone_oranges_stars { global.attack_counter_max = 40 if (global.attack_counter == 0) { var distance_factor = 15 var random_generator_1 = irandom_range(0, 1) var random_generator_2 = irandom_range(0, 4) if (random_generator_1 == 0) { if (random_generator_2 > 0) instance_create(obj_heart_battle_fighting_parent.x, (obj_dialogue_box_battle_transformation_any.bbox_top - distance_factor), obj_battle_enemy_attack_know_cone_orange_white) else instance_create(obj_heart_battle_fighting_parent.x, (obj_dialogue_box_battle_transformation_any.bbox_top - distance_factor), obj_battle_enemy_attack_know_cone_orange) } else if (random_generator_1 == 1) { if (random_generator_2 > 0) instance_create(obj_heart_battle_fighting_parent.x, (obj_dialogue_box_battle_transformation_any.bbox_bottom + distance_factor), obj_battle_enemy_attack_know_cone_orange_white) else instance_create(obj_heart_battle_fighting_parent.x, (obj_dialogue_box_battle_transformation_any.bbox_bottom + distance_factor), obj_battle_enemy_attack_know_cone_orange) } var distance = 20 var max_variations = 4 var sector = irandom_range(0, 1) var sector_2 = irandom_range(0, 1) if (sector == 0) { if (sector_2 == 0) instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance), (obj_dialogue_box_battle_transformation_any.bbox_top - distance + (obj_dialogue_box_battle_transformation_any.bbox_bottom + distance * 2 - obj_dialogue_box_battle_transformation_any.bbox_top) / max_variations * (irandom_range(0, max_variations))), obj_battle_enemy_attack_insomnitot_star) else if (sector_2 == 1) instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + distance), (obj_dialogue_box_battle_transformation_any.bbox_top - distance + (obj_dialogue_box_battle_transformation_any.bbox_bottom + distance * 2 - obj_dialogue_box_battle_transformation_any.bbox_top) / max_variations * (irandom_range(0, max_variations))), obj_battle_enemy_attack_insomnitot_star) } else if (sector == 1) { if (sector_2 == 0) instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance + (obj_dialogue_box_battle_transformation_any.bbox_right + distance * 2 - obj_dialogue_box_battle_transformation_any.bbox_left) / max_variations * (irandom_range(0, max_variations))), (obj_dialogue_box_battle_transformation_any.bbox_top - distance), obj_battle_enemy_attack_insomnitot_star) else if (sector_2 == 1) instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance + (obj_dialogue_box_battle_transformation_any.bbox_right + distance * 2 - obj_dialogue_box_battle_transformation_any.bbox_left) / max_variations * (irandom_range(0, max_variations))), (obj_dialogue_box_battle_transformation_any.bbox_bottom + distance), obj_battle_enemy_attack_insomnitot_star) } } }
() //gml_Script_scr_enemy_attack_know_cone_oranges_stars
2
{
3
    global.attack_counter_max = 40
4
    if (global.attack_counter == 0)
5
    {
6
        var distance_factor = 15
7
        var random_generator_1 = irandom_range(0, 1)
8
        var random_generator_2 = irandom_range(0, 4)
9
        if (random_generator_1 == 0)
10
        {
11
            if (random_generator_2 > 0)
12
                instance_create(obj_heart_battle_fighting_parent.x, (obj_dialogue_box_battle_transformation_any.bbox_top - distance_factor), obj_battle_enemy_attack_know_cone_orange_white)
13
            else
14
                instance_create(obj_heart_battle_fighting_parent.x, (obj_dialogue_box_battle_transformation_any.bbox_top - distance_factor), obj_battle_enemy_attack_know_cone_orange)
15
        }
16
        else if (random_generator_1 == 1)
17
        {
18
            if (random_generator_2 > 0)
19
                instance_create(obj_heart_battle_fighting_parent.x, (obj_dialogue_box_battle_transformation_any.bbox_bottom + distance_factor), obj_battle_enemy_attack_know_cone_orange_white)
20
            else
21
                instance_create(obj_heart_battle_fighting_parent.x, (obj_dialogue_box_battle_transformation_any.bbox_bottom + distance_factor), obj_battle_enemy_attack_know_cone_orange)
22
        }
23
        var distance = 20
24
        var max_variations = 4
25
        var sector = irandom_range(0, 1)
26
        var sector_2 = irandom_range(0, 1)
27
        if (sector == 0)
28
        {
29
            if (sector_2 == 0)
30
                instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance), (obj_dialogue_box_battle_transformation_any.bbox_top - distance + (obj_dialogue_box_battle_transformation_any.bbox_bottom + distance * 2 - obj_dialogue_box_battle_transformation_any.bbox_top) / max_variations * (irandom_range(0, max_variations))), obj_battle_enemy_attack_insomnitot_star)
31
            else if (sector_2 == 1)
32
                instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + distance), (obj_dialogue_box_battle_transformation_any.bbox_top - distance + (obj_dialogue_box_battle_transformation_any.bbox_bottom + distance * 2 - obj_dialogue_box_battle_transformation_any.bbox_top) / max_variations * (irandom_range(0, max_variations))), obj_battle_enemy_attack_insomnitot_star)
33
        }
34
        else if (sector == 1)
35
        {
36
            if (sector_2 == 0)
37
                instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance + (obj_dialogue_box_battle_transformation_any.bbox_right + distance * 2 - obj_dialogue_box_battle_transformation_any.bbox_left) / max_variations * (irandom_range(0, max_variations))), (obj_dialogue_box_battle_transformation_any.bbox_top - distance), obj_battle_enemy_attack_insomnitot_star)
38
            else if (sector_2 == 1)
39
                instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance + (obj_dialogue_box_battle_transformation_any.bbox_right + distance * 2 - obj_dialogue_box_battle_transformation_any.bbox_left) / max_variations * (irandom_range(0, max_variations))), (obj_dialogue_box_battle_transformation_any.bbox_bottom + distance), obj_battle_enemy_attack_insomnitot_star)
40
        }
41
    }
42
}