Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_enemy_attack_insomnitot_stars

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

function scr_enemy_attack_insomnitot_stars() //gml_Script_scr_enemy_attack_insomnitot_stars { global.attack_counter_max = 20 if (global.attack_counter == 0) { 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_insomnitot_stars
2
{
3
    global.attack_counter_max = 20
4
    if (global.attack_counter == 0)
5
    {
6
        var distance = 20
7
        var max_variations = 4
8
        var sector = irandom_range(0, 1)
9
        var sector_2 = irandom_range(0, 1)
10
        if (sector == 0)
11
        {
12
            if (sector_2 == 0)
13
                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)
14
            else if (sector_2 == 1)
15
                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)
16
        }
17
        else if (sector == 1)
18
        {
19
            if (sector_2 == 0)
20
                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)
21
            else if (sector_2 == 1)
22
                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)
23
        }
24
    }
25
}