What's the best way to ensure that my enemy units don't hurt each other, but do hurt the the player and his stuff?
I have an example below, where I've placed a force several places. Over-kill, but not sure where the best spot is.
Code: Select all
-- Stream Spitters - Fire Streams (hydralisk)
function Spitter_Attack_Stream_Fire(data)
return {
type = "stream",
force = "enemy",
ammo_category = "flamethrower",
range_mode = "bounding-box-to-bounding-box",
cooldown = data.cooldown,
range = data.range,
projectile_creation_distance = 1.9,
damage_modifier = data.damage_modifier or 1.0,
warmup = data.range * 1.5, -- 15,
min_range = 6,
turn_range = 1.0,
fire_penalty = 30,
gun_barrel_length = 1 * data.scale,
gun_center_shift = {
north = {-0.4 * data.scale, -1.8 * data.scale},
east = {3 * data.scale, 4 * data.scale},
south = {-0.4 * data.scale, 8.8 * data.scale},
west = {0.65 * data.scale, 4 * data.scale}
},
ammo_type = {
category = "flamethrower",
action = {
type = "direct",
force = "enemy",
action_delivery = {
type = "stream",
force = "enemy",
stream = "ne-fire-stream",
source_offset = {0.15, -0.5},
--source_offset = {-100, -0.5},
max_length = data.range,
duration = 160
}
}
},
sound = sounds.spitter_roars(data.roarvolume),
animation = zerg_hydralisk_attackanimation("hydralisk", data.scale, data.tint1)
}
end
Thanks