I want to make a turret, which attack ALL enemies units within the circular area around them (like the highlighted area of a turret BUT not anything outside it).
My code is as follows (which attack things outside the area), what should be changed?
Code: Select all
attack_parameters =
{
type = "projectile",
ammo_category = "electric",
cooldown = 10,
projectile_center = {0, 0},
projectile_creation_distance = 0.6,
range = 16,
sound =
{
filename = "__base__/sound/fight/pulse.ogg",
volume = 0.4
},
ammo_type =
{
type = "projectile",
category = "electric",
energy_consumption = "200kJ",
speed = 1,
action =
{
{
type = "area",
radius = 16,
force = "enemy",
action_delivery =
{
{
type = "instant",
target_effects =
{
{
type = "create-sticker",
sticker = "stun-sticker"
},
}
},
}
}
}
}
},