[posila] Making multiple beams from the same turrets / strange behavior
Posted: Mon Jun 10, 2019 2:12 pm
When you create multiple beams from the same turret and at least 1 of the beam durations is equal to the cooldown, only 1 beam gets fired.
But when you set the cooldown to 1 higher than the beam durations, the target random offset gets randomized every shot.
At least it's not noticeable that the beam gets interrupted for 1 tick...
I don't really want to disable the target random offset either...
My other idea was to add the second beam to the action of the first beam, but that results in the second beam being active for 1 interval longer than the first beam...
I hope you can fix this, help me or implement the glow in the base game, cause it really improves visual aesthetics
But when you set the cooldown to 1 higher than the beam durations, the target random offset gets randomized every shot.
At least it's not noticeable that the beam gets interrupted for 1 tick...
I don't really want to disable the target random offset either...
My other idea was to add the second beam to the action of the first beam, but that results in the second beam being active for 1 interval longer than the first beam...
I hope you can fix this, help me or implement the glow in the base game, cause it really improves visual aesthetics
Code: Select all
data.raw["electric-turret"]["laser-turret"]. attack_parameters =
{
type = "beam",
cooldown = 21,
range = 24,
source_direction_count = 64,
source_offset = {0, -3.423489 / 4},
damage_modifier = 2,
ammo_type =
{
category = "laser-turret",
energy_consumption = "1kJ",
action =
{
{
type = "direct",
action_delivery =
{
type = "beam",
beam = "laser-beam",
max_length = 24,
duration = 20,
source_offset = {0, -1.31439 }
}
},
{
type = "direct",
action_delivery =
{
type = "beam",
beam = "laser-beam-light",
max_length = 24,
duration = 20,
source_offset = {0, 0.0 }
}
}
}
}
}