Page 1 of 1
Modded turret stop shooting
Posted: Sat Nov 22, 2014 12:03 am
by psychobarge
Hi everyone,
I've modded somme turrets and i have a problem :
The turret start shooting at biters, kills some of them and then stops shooting, even if there is enough ammunition inside and some biters still arround, it just stops and return to its folded status... sometime if i kill the last biters and bring some more they start shooting again and stop the same way. Is there some kind of magic i do not (yet ?) understand ? i tried with a base vanilla turret with my mod instaled and it behaved the same, i'm pretty sure it does not without my mod.
Also an other question : what the propertie "automated_ammo_count" stands for ? seems like something that could be part of my problem...
My turret take a 100 bullets ammo box and the automated_ammo_count is 10. Also i'm pretty sure the turrets shoots more than 10 bullet befor it stops.
Please skilled modders i need your help

Re: Modded turret stop shooting
Posted: Sat Nov 22, 2014 9:07 am
by Align
I'd wager that the automated_ammo_count variable determines when an inserter will stop inserting ammo - if there are already 10 magazines in the turret, no more will be inserted.
Re: Modded turret stop shooting
Posted: Sat Nov 22, 2014 10:33 am
by L0771
rotation_speed?
Post entity code (where says Type = "ammo-turret"), maybe we can help
Re: Modded turret stop shooting
Posted: Sat Nov 22, 2014 12:04 pm
by psychobarge
Thanks for your answer

here is the entity :
Code: Select all
{
type = "ammo-turret",
name = "7-62-mm-turret",
icon = "__BetterTurrets__/graphics/items/betterTurret-7-62mm.png",
flags = {"placeable-player", "player-creation"},
minable = {mining_time = 0.5, result = "7-62-mm-turret"},
max_health = 175,
corpse = "small-remnants",
collision_box = {{-0.4, -0.9 }, {0.4, 0.9}},
selection_box = {{-0.5, -1 }, {0.5, 1}},
rotation_speed = 0.015,
preparing_speed = 0.08,
folding_speed = 0.08,
dying_explosion = "huge-explosion",
inventory_size = 1,
automated_ammo_count = 10,
folded_animation = (function()
local res = util.table.deepcopy(betterTurret_extension_minigun)
res.frame_count = 1
res.line_length = 1
return res
end)(),
preparing_animation = betterTurret_extension_minigun,
prepared_animation =
{
filename = "__BetterTurrets__/graphics/entities/betterTurret-sprite-green.png",
priority = "medium",
width = 178,
height = 107,
direction_count = 64,
frame_count = 1,
line_length = 8,
axially_symmetrical = false,
shift = {1.34375, -0.46875 + 0.6}
},
folding_animation = (function()
local res = util.table.deepcopy(betterTurret_extension_minigun)
res.run_mode = "backward"
return res
end)(),
base_picture =
{
filename = "__BetterTurrets__/graphics/entities/betterTurret-base-green.png",
priority = "high",
width = 43,
height = 28,
shift = { 0, -0.125 + 0.6 }
},
attack_parameters =
{
ammo_category = "7-62-mm-bullet-category",
cooldown = 5,
projectile_center = {0, 0.6},
projectile_creation_distance = 1.2,
shell_particle =
{
name = "shell-particle",
direction_deviation = 0.1,
speed = 0.1,
speed_deviation = 0.03,
center = {0, 0.6},
creation_distance = 0.6,
starting_frame_speed = 0.2,
starting_frame_speed_deviation = 0.1
},
range = 30,
sound =
{
{
filename = "__BetterTurrets__/sound/7-62mm.ogg",
volume = 0.6
}
}
}
}
hope that helps... i did not change the turning speed yet so its the same as the vanilla one...
Also tx for the "automated_ammo_count" tip

Re: Modded turret stop shooting
Posted: Sat Nov 22, 2014 12:14 pm
by Liquius
I had a play with this earlier this week. I am guessing your problem is with the ammo. Does your ammo create a projectile like the tank shell?
Re: Modded turret stop shooting
Posted: Sat Nov 22, 2014 12:31 pm
by psychobarge
Liquius wrote:I had a play with this earlier this week. I am guessing your problem is with the ammo. Does your ammo create a projectile like the tank shell?
Yes it does ! you believe the problem is there? if so its not a bug in my mod but in the game ...