The problem is that it is randomly shifts the offset when changing the animation speed, and sometimes it even does shifts the offset for the same values. Does anyone know what the problem might be?
Code: Select all
local variableAnimation = table.deepcopy(data.raw["explosion"]["nuke-explosion"].animations.hr_version)
variableAnimation.name = "variableExplosion"
variableAnimation.type = "animation"
variableAnimation.dice_y = 0
variableAnimation.priority = "extra-high"
variableAnimation.animation_speed = 1
variableAnimation.shift = {0,0}
data:extend{variableAnimation}
Code: Select all
local animationSpeed = 1
local animationLife = 100
local animationOffset = 0
rendering.draw_animation{animation="variableExplosion", animation_speed=animationSpeed, target=position, time_to_live=animationLife, animation_offset = animationOffset, surface="nauvis"}