Timeline Component in BP not ticking when World Paused

I have a BP in my level that controls the lighting via a timeline component. While the world is ticking this BP runs fine. However when the game is paused (via UGameplayStatics::SetGamePaused in cpp) I need this timeline to still tick for game design reasons.

My first thought was obviously to set everything to do with this BP as Tickable when Paused

But alas, the whole BP seems to not get ticked.

The class defaults have Tick Even When Paused set to true.

image

Any ideas?

EDIT: UE 4.27 btw.

Thank you, In the second screenshot of my post you can see I call Set Tickable When Paused on the timeline.

Well it works in my project.

Add a breakpoint to check if those commands are called once the game starts.
Also check if the timeline variable is set to the correct timeline.

Thanks, the timeline does work while the game is playing. However once the game is paused the breakpoints are no longer hit. The timeline variables are all correct.

Try setting it directly like I did (just pull out the timeline component on the left side) and set it to run on pause before it initializes.

Also just setting the new time won’t cause it to play unless you are calling it at intervals.

This will have it set a new time and then play / update.

1 Like

Thanks, If I hook it up as you say, then indeed the TimeLine does play when the game is paused. However, we want the time to be set on the Event Tick for the BP. If we call play then the Timeline just plays through and seems to ignore the new time we are setting.

We need to control the position in the timeline while the rest of the game is paused. This is what is broken for us. When the game is running, setting new time every tick adjusts the TimeLine as expected. However when the game is paused AND the TimeLine, BP, Actor etc have all been told to Tick While Paused, the Event Tick is not called so the New Time is never set from our simulation and thus the timeline never updates and our day/night cycle stops.

Both the timeline and the owning actor need to tick when paused, then it works.
Check that whatever is setting “Sim Get Day Night Cycle” is also running when paused.

I am clearly getting tick & timeline running while paused.

Try to narrow down the cause of the problem, through means of elimination.

Very wise words, alas I have already tried calling SetTickableWhenPaused(true); on the AIGameState class and it makes no difference.

It seems to me that a Timeline isn’t considered for ticking unless it’s Play pin is connected. It would be good if someone could confirm this. We specifically want to NOT call Play as we want to set the time based on external factors in our Simulation (written in C++).

I am getting constant print string text on screen from the timeline when it is driven by tick. No matter if the game is paused or unpaused.
Edit: I am using the set new time pin just like you. (Play is disconnected)

Edit2: Seems GameState does not seem to respect the tick even when paused. This is probably the source of the problem. The timeline updates regardless (you can see is input and output updating)

Thank for digging deeper @3dRaven. I just fixed it here. One of our artists had set the Tick Interval to 0.0666 (for legitimate reasons).

image

If I remove that (set the value to zero) then it all works as expected.