1 |
if live_call() |
2 |
return global.live_result; |
3 |
var battle_box = obj_dialogue_box_battle_transformation_any |
4 |
switch attack_tick |
5 |
{ |
6 |
case 30: |
7 |
case 70: |
8 |
case 110: |
9 |
do |
10 |
{ |
11 |
var snake_spawn_y = choose((battle_box.bbox_top + 20), battle_box.y, (battle_box.bbox_bottom - 20)) |
12 |
} until (snake_spawn_y != snake_spawn_last); |
13 |
var snake = instance_create_depth(choose((battle_box.bbox_left - 40), (battle_box.bbox_right + 40)), snake_spawn_y, -50, obj_battle_enemy_attack_slither_snake_snake) |
14 |
if (snake.x < battle_box.x) |
15 |
snake.direction = 0 |
16 |
else |
17 |
{ |
18 |
snake.image_yscale = -1 |
19 |
snake.direction = 180 |
20 |
} |
21 |
snake.image_angle = snake.direction |
22 |
snake.speed = 5 |
23 |
snake_spawn_last = snake_spawn_y |
24 |
break |
25 |
case 150: |
26 |
case 190: |
27 |
case 230: |
28 |
do |
29 |
{ |
30 |
var snake_spawn_x = choose((battle_box.bbox_left + 20), battle_box.x, (battle_box.bbox_right - 20)) |
31 |
} until (snake_spawn_x != snake_spawn_last); |
32 |
snake = instance_create_depth(snake_spawn_x, choose((battle_box.bbox_top - 40), (battle_box.bbox_bottom + 40)), -50, obj_battle_enemy_attack_slither_snake_snake) |
33 |
if (snake.y < battle_box.y) |
34 |
snake.direction = 270 |
35 |
else |
36 |
snake.direction = 90 |
37 |
snake.image_angle = snake.direction |
38 |
snake.speed = 5 |
39 |
snake_spawn_last = snake_spawn_x |
40 |
break |
41 |
case 270: |
42 |
instance_destroy() |
43 |
break |
44 |
} |
45 |
|
46 |
attack_tick += 1 |