| 1 |
if (live_call()) |
| 2 |
return global.live_result; |
| 3 |
if (robot_parent != -4) |
| 4 |
{ |
| 5 |
switch (robot_parent.object_index) |
| 6 |
{ |
| 7 |
case obj_guardener_guy_a_noarms: |
| 8 |
x = robot_parent.x - 3; |
| 9 |
y = robot_parent.y - 15; |
| 10 |
break; |
| 11 |
case obj_guardener_guy_b_noarms: |
| 12 |
x = robot_parent.x + 3; |
| 13 |
y = robot_parent.y - 10; |
| 14 |
break; |
| 15 |
} |
| 16 |
} |
| 17 |
if (image_speed == 0) |
| 18 |
{ |
| 19 |
if (throw_delay > 0) |
| 20 |
{ |
| 21 |
throw_delay--; |
| 22 |
} |
| 23 |
else |
| 24 |
{ |
| 25 |
image_index = 0; |
| 26 |
image_speed = 1; |
| 27 |
if (bombs == true) |
| 28 |
throw_delay = throw_delay_bomb; |
| 29 |
} |
| 30 |
} |
| 31 |
if (image_index >= (image_number - 1)) |
| 32 |
{ |
| 33 |
image_speed = 0; |
| 34 |
image_index = 0; |
| 35 |
throw_noloop = false; |
| 36 |
} |
| 37 |
if (image_index >= 5 && throw_noloop == false) |
| 38 |
{ |
| 39 |
if (bombs == true) |
| 40 |
{ |
| 41 |
var dir_min = 60; |
| 42 |
var dir_max = 80; |
| 43 |
var item = instance_create_depth(x, y, depth, obj_battle_enemy_attack_guardener_throwable_bomb); |
| 44 |
item.direction = irandom_range(dir_min, dir_max) * image_xscale; |
| 45 |
item.speed = 8 * image_xscale; |
| 46 |
} |
| 47 |
else |
| 48 |
{ |
| 49 |
var item = instance_create_depth(x, y, depth, obj_battle_enemy_attack_guardener_throwable_item); |
| 50 |
var dir_min = 25; |
| 51 |
var dir_max = 80; |
| 52 |
item.direction = irandom_range(dir_min, dir_max) * image_xscale; |
| 53 |
item.speed = 8 * image_xscale; |
| 54 |
} |
| 55 |
throw_noloop = true; |
| 56 |
} |