1 |
if live_call() |
2 |
return global.live_result; |
3 |
var list_pos = irandom_range(0, (ds_list_size(bullet_list) - 1)) |
4 |
var bul_spawn = ds_list_find_value(bullet_list, list_pos) |
5 |
ds_list_delete(bullet_list, list_pos) |
6 |
switch bul_spawn |
7 |
{ |
8 |
case "left": |
9 |
var bullet = instance_create_depth((battle_box.bbox_left + 20), battle_box.bbox_bottom, -100, obj_battle_enemy_attack_bullet_1) |
10 |
bullet.target_x = battle_box.bbox_right |
11 |
bullet.target_y = battle_box.bbox_top - 70 |
12 |
bullet.turn_rate = 0.065 |
13 |
break |
14 |
case "middle": |
15 |
bullet = instance_create_depth(battle_box.x, battle_box.bbox_bottom, -100, obj_battle_enemy_attack_bullet_1) |
16 |
bullet.target_x = 320 |
17 |
bullet.target_y = battle_box.bbox_bottom |
18 |
break |
19 |
case "right": |
20 |
bullet = instance_create_depth((battle_box.bbox_right - 20), battle_box.bbox_bottom, -100, obj_battle_enemy_attack_bullet_1) |
21 |
bullet.target_x = battle_box.bbox_left |
22 |
bullet.target_y = battle_box.bbox_top - 70 |
23 |
bullet.turn_rate = 0.065 |
24 |
break |
25 |
} |
26 |
|
27 |
if (ds_list_size(bullet_list) > 0) |
28 |
alarm[0] = bullet_offsetalarm[0]if live_call()
return global.live_result;
var list_pos = irandom_range(0, (ds_list_size(bullet_list) - 1))
var bul_spawn = ds_list_find_value(bullet_list, list_pos)
ds_list_delete(bullet_list, list_pos)
switch bul_spawn
{
case "left":
var bullet = instance_create_depth((battle_box.bbox_left + 20), battle_box.bbox_bottom, -100, obj_battle_enemy_attack_bullet_1)
bullet.target_x = battle_box.bbox_right
bullet.target_y = battle_box.bbox_top - 70
bullet.turn_rate = 0.065
break
case "middle":
bullet = instance_create_depth(battle_box.x, battle_box.bbox_bottom, -100, obj_battle_enemy_attack_bullet_1)
bullet.target_x = 320
bullet.target_y = battle_box.bbox_bottom
break
case "right":
bullet = instance_create_depth((battle_box.bbox_right - 20), battle_box.bbox_bottom, -100, obj_battle_enemy_attack_bullet_1)
bullet.target_x = battle_box.bbox_left
bullet.target_y = battle_box.bbox_top - 70
bullet.turn_rate = 0.065
break
}
if (ds_list_size(bullet_list) > 0)
alarm[0] = bullet_offset
else if (wave_number > 0)
{
ds_list_add(bullet_list, "left", "middle", "right")
alarm[0] = bullet_offset * 10
wave_number -= 1
}
else
alarm[1] = 160 |
29 |
else if (wave_number > 0) |
30 |
{ |
31 |
ds_list_add(bullet_list, "left", "middle", "right") |
32 |
alarm[0] = bullet_offset * 10alarm[0]if live_call()
return global.live_result;
var list_pos = irandom_range(0, (ds_list_size(bullet_list) - 1))
var bul_spawn = ds_list_find_value(bullet_list, list_pos)
ds_list_delete(bullet_list, list_pos)
switch bul_spawn
{
case "left":
var bullet = instance_create_depth((battle_box.bbox_left + 20), battle_box.bbox_bottom, -100, obj_battle_enemy_attack_bullet_1)
bullet.target_x = battle_box.bbox_right
bullet.target_y = battle_box.bbox_top - 70
bullet.turn_rate = 0.065
break
case "middle":
bullet = instance_create_depth(battle_box.x, battle_box.bbox_bottom, -100, obj_battle_enemy_attack_bullet_1)
bullet.target_x = 320
bullet.target_y = battle_box.bbox_bottom
break
case "right":
bullet = instance_create_depth((battle_box.bbox_right - 20), battle_box.bbox_bottom, -100, obj_battle_enemy_attack_bullet_1)
bullet.target_x = battle_box.bbox_left
bullet.target_y = battle_box.bbox_top - 70
bullet.turn_rate = 0.065
break
}
if (ds_list_size(bullet_list) > 0)
alarm[0] = bullet_offset
else if (wave_number > 0)
{
ds_list_add(bullet_list, "left", "middle", "right")
alarm[0] = bullet_offset * 10
wave_number -= 1
}
else
alarm[1] = 160 |
33 |
wave_number -= 1 |
34 |
} |
35 |
else |
36 |
alarm[1] = 160alarm[1]if live_call()
return global.live_result;
instance_destroy() |