ID:2409517
 
Code:
        animate(Target,pixel_z=min(TimeMod,48), time=round(TimeMod*0.5), flags=ANIMATION_RELATIVE)
animate(Target,pixel_z=-1*(min(TimeMod,48)), icon_state="KB", time=round(TimeMod), flags=ANIMATION_RELATIVE | ANIMATION_PARALLEL)


Problem description:

Small thing I noticed when position animating code: during this entire animation I wasn't able to capture a point where the pixel_z value for the object affected changes (despite the first one completing twice as fast), so when I went to design some functions based off that positioning, they didn't actually trigger properly. It also makes certain object generation that's meant to align with the objects' position appear kind of skewed when pixel_z is involved

It doesn't seem to be directly tied to ANIMATION_RELATIVE, as other relative animations affecting positioning work fine
Another thing I noticed in reference to a slightly bigger bit of same code:

Target.Launched+=round(TimeMod)
animate(Target,pixel_z=min(TimeMod,48), time=round(TimeMod*0.5), flags=ANIMATION_RELATIVE)
animate(Target,pixel_z=-1*(min(TimeMod,48)), icon_state="KB", time=round(TimeMod), flags=ANIMATION_RELATIVE | ANIMATION_PARALLEL)
for(Target.Launched, Target.Launched>=0, Target.Launched--)
world << Target.Launched
sleep(1)
LaunchLand(Target)


While the Launched value should hit 0 on the same time the second, longer animation reaches its end, it seems like it reaches 0 [and ends the entire thing] notably faster
Aight, the first thing seems to be working as intended as I was told by another dev.

But the latter thing seems to be some odd way animate compensates between world.tick_lag shorter than 1 decisecond and decisecond itself. when they're aligned, the animation ends when the value runs down to 0.

That's a little troublesome when the game runs in higher than 10 fps.
Your math for your delays are wrong. You are rounding completely wrong, and you are also assuming that round(1/2)*2 = 1. This is just wrong. You didn't do your algebra.

I need more information. What FPS is your project running at?
Actually, after correcting for world tick lag, the animations align fine for any input value, even with the rounding, so the maths work out.

        Target.Launched+=round(TimeMod)
animate(Target,pixel_z=min(TimeMod,48), time=round(TimeMod*0.5)*world.tick_lag, flags=ANIMATION_RELATIVE)
animate(Target,pixel_z=-1*(min(TimeMod,48)), icon_state="KB", time=round(TimeMod)*world.tick_lag, flags=ANIMATION_RELATIVE|ANIMATION_PARALLEL)
for(Target.Launched, Target.Launched>=0, Target.Launched--)
world << "[Target.Launched] - launched status"
sleep(1)