Adding time to existing timer with box trigger checkpoints

Just curious, why shouldn’t you use tick plus a delay, is that not as efficient as a timer? Thanks.

Never put delay nodes on Tick function.

Essentially the delay can extend frame time (decrease FPS).

example…
60Hz tick has an interval of 16.667ms, so every 16.667ms Tick event fires. If you add a 0.2 delay you’re adding 200ms to the interval. Thus 16.667ms + 200ms.

Also there’s a chance the next forced tick will happen at its correct interval 16.667ms and simply override the delay. Meaning anything after the delay node will never get called.

Either of these can happen. One of which will definitely happen.

2 Likes

to add my 2 cents: the engine also keeps track of every actor that ticks. These actors get called and the tick function ran before moving to the next frame. Having a delay node doing nothing is just forcing the engine to “pick up” the actor and run the tick function just to hit a dead end.

He says it better than me, watch until 29:50 : UE4 Performance and Profiling | Unreal Dev Day Montreal 2017 | Unreal Engine - YouTube

1 Like

@pezzott1

" This is close. The ++ node all it does is adds 1 to the variable that it has connected. In this case I think it is adding Seconds = Seconds + 60 + 1. I could be wrong, I would simply not be setting to anything."

I did notice that on some of my attempts, it would add only that one second to the time, instead of the 60 I was trying to add. I was just trying things out really. Starting again would mean rebuilding the timer, which if I end up doing so be it (I have had to redo other things.) The stuff to add the time was only those few nodes.

I managed to make a system to bring up segments based on the triggers so it looks like you are travelling somewhere else even though the tunnel only has one path. Yet the time stuff just goes a bit beyond me. A standard timer I have achieved but manipulating it is proving quite challenging for me. But I’ll keep trying.

Thanks for helping out though. It is the closest I have managed so far.

I am close to publishing my first mobile game so l really appreciate this advice. @pezzott1 thank you for the link.

I made the mistake of making the game first and worrying about performance time after.

Awesome! Congrats.

It’s a little off topic, but wanted to share a quick example, albeit exaggerated, to prove a point → 1,000 instances of an empty blueprint actor with nothing connected to the tick function.:
image

image

tick enabled:
image

tick disabled:
image

2 Likes

Oh ■■■■ yeah l see what you mean. I’ve just started the video you linked. Seems like l know little about optimization within UE4 haha. After the watching the video, I’ll have to remove all these delays within the ticks (l assume timers are ok?) and apply the other advice in the video. Happy :smiley:

1 Like

Well, I’m getting closer. I have managed to make it change the time…Say I give it two minutes to get to the checkpoint. Then want to add 60 by going through it, well I instead of that I got it to change the time so it will change the time to 60 seconds. It’s half way there, depending on how long on average it takes to clear a section it could be useful to use set times on the checkpoints. However I think adding would be more flexible with with the challenge of clearing the sections.


I did try a ++ coming off branch at one point to add 60 seconds, but it had the same result. I have tried it coming off both sequences, with the same result.

So I have managed to make it do something at least!


This should always return true, because you are comparing the variable against itself.