1 |
if live_call() |
2 |
return global.live_result; |
3 |
battle_box = obj_dialogue_box_battle_transformation_any |
4 |
snake_spawn_last = 0 |
5 |
attack_tick = 0 |
6 |
scr_enable_battle_box_surface() |
7 |
spacing_h = 46 |
8 |
spacing_v = 84 |
9 |
start_r_x = battle_box.bbox_left + 1 |
10 |
start_r_y = battle_box.bbox_top - 13 |
11 |
start_l_x = start_r_x + (round(spacing_h / 2)) |
12 |
start_l_y = start_r_y - (round(spacing_v / 2)) |
13 |
rows = 4 |
14 |
columns = 3 |
15 |
random_green_r = irandom_range(1, ((rows - 1) * columns)) |
16 |
random_green_l = irandom_range(1, ((rows - 1) * columns)) |
17 |
for (i = 0; i < columns; i++) |
18 |
{ |
19 |
for (j = 0; j < rows; j++) |
20 |
{ |
21 |
instance_create((start_r_x + spacing_h * j), (start_r_y - spacing_v * i), obj_battle_enemy_attack_cactony_needle_green_white) |
22 |
with (global.id_store) |
23 |
move_direction = 1 |
24 |
if ((i * rows + (j + 1)) == random_green_r) |
25 |
{ |
26 |
with (global.id_store) |
27 |
event_user(3) |
28 |
} |
29 |
} |
30 |
} |
31 |
for (i = 0; i < columns; i++) |
32 |
{ |
33 |
for (j = 0; j < rows; j++) |
34 |
{ |
35 |
instance_create((start_l_x + spacing_h * j), (start_l_y - spacing_v * i), obj_battle_enemy_attack_cactony_needle_green_white) |
36 |
with (global.id_store) |
37 |
move_direction = -1 |
38 |
if ((i * rows + (j + 1)) == random_green_r) |
39 |
{ |
40 |
with (global.id_store) |
41 |
event_user(3) |
42 |
} |
43 |
} |
44 |
} |
45 |
alarm[0] = 250 |