Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_cactony_needle_green_generator_Create_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
var dbox = obj_dialogue_box_battle_transformation_any
4
spacing_h = 46
5
spacing_v = 84
6
start_r_x = dbox.bbox_left + 1
7
start_r_y = dbox.bbox_top - 13
8
start_l_x = start_r_x + (round(spacing_h / 2))
9
start_l_y = start_r_y - (round(spacing_v / 2))
10
rows = 4
11
columns = 3
12
random_green_r = irandom_range(1, ((rows - 2) * columns))
13
random_green_l = irandom_range(1, ((rows - 2) * columns))
14
for (i = 0; i < columns; i++)
15
{
16
    for (j = 0; j < rows; j++)
17
    {
18
        instance_create((start_r_x + spacing_h * j), (start_r_y - spacing_v * i), obj_battle_enemy_attack_cactony_needle_green_white)
19
        with (global.id_store)
20
            move_direction = 1
21
        if ((i * rows + (j + 1)) == random_green_r)
22
        {
23
            with (global.id_store)
24
                event_user(3)
25
        }
26
    }
27
}
28
for (i = 0; i < columns; i++)
29
{
30
    for (j = 0; j < rows; j++)
31
    {
32
        instance_create((start_l_x + spacing_h * j), (start_l_y - spacing_v * i), obj_battle_enemy_attack_cactony_needle_green_white)
33
        with (global.id_store)
34
            move_direction = -1
35
        if ((i * rows + (j + 1)) == random_green_r)
36
        {
37
            with (global.id_store)
38
                event_user(3)
39
        }
40
    }
41
}