Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_bowll_bull_generator_Create_0

(view raw script w/o annotations or w/e)
1
box = obj_dialogue_box_battle_transformation_any
2
c_total = 8
3
c_distance = 5
4
c_sectors = 4
5
c_width = 33
6
c_spacing = floor(0.5 + (box.sprite_width - 10 - c_width * c_sectors) / (c_sectors + 1))
7
end_alarm = 20
8
no_loop_alarm = false
9
random_list = ds_list_create()
10
for (i = 1; i < (4 * c_sectors); i++)
11
    ds_list_add(random_list, i)
12
ds_list_shuffle(random_list)
13
i_add = 0
14
for (i = 0; i < c_total; i++)
15
{
16
    c_value = ds_list_find_value(random_list, (i + i_add))
17
    if (i > 0)
18
    {
19
        var increment_i = true
20
        while (increment_i == true)
21
        {
22
            increment_i = false
23
            j = 0
24
            while (j < i)
25
            {
26
                if (abs(c_value_store[j] - c_value) == (2 * c_sectors))
27
                {
28
                    increment_i = true
29
                    break
30
                }
31
                else
32
                {
33
                    j++
34
                    continue
35
                }
36
            }
37
            if (increment_i == true)
38
            {
39
                i_add += 1
40
                c_value = ds_list_find_value(random_list, (i + i_add))
41
            }
42
        }
43
    }
44
    c_value_store[i] = c_value
45
    c_direction = 1
46
    while (c_value > c_sectors)
47
    {
48
        c_direction += 1
49
        c_value -= c_sectors
50
    }
51
    var c_sub = c_value - 1
52
    var c_disjoint = 20 + c_spacing * c_value + c_width * c_sub
53
    switch c_direction
54
    {
55
        case 1:
56
            cape_dir = 0
57
            instance_create((box.bbox_right + c_distance), (box.bbox_top + c_disjoint), obj_battle_enemy_attack_bowll_bull_cape)
58
            break
59
        case 2:
60
            cape_dir = 90
61
            instance_create((box.bbox_left + c_disjoint), (box.bbox_top - c_distance), obj_battle_enemy_attack_bowll_bull_cape)
62
            break
63
        case 3:
64
            cape_dir = 180
65
            instance_create((box.bbox_left - c_distance), (box.bbox_top + c_disjoint), obj_battle_enemy_attack_bowll_bull_cape)
66
            break
67
        case 4:
68
            cape_dir = 270
69
            instance_create((box.bbox_left + c_disjoint), (box.bbox_bottom + c_distance), obj_battle_enemy_attack_bowll_bull_cape)
70
            break
71
    }
72
73
}
74
ds_list_destroy(random_list)