Event tick performance

I read couple of days ago about that multiple Event ticks are very costly performance-wise, but I require constant updates on some objects based on values of other objects which also change their value constantly. I set the tick interval to 10 seconds and I could even put it to 1 minute but I was thinking if I have; let’s say 10 objects with 1 minute tick interval, does all of those objects run the Event tick at the same time every minute on the same frame?
If so, is there a way to change the pattern of the Event ticks so that they will be executed on separate frames to save more performance (or does it even save performance)?

Also if there’s a better way to do this without Event ticks I’d be happy to hear but so far I’ve not figured out how to do constant updates without Event ticks, each object has 2 different float values and both values change based on another objects which also have constantly updating 2 different float values based on bool values

You could do it by using events. If there is a value which changes over time and multiple reactions should follow this change, you should use events.

Are these 10 objects you are talking about depending on each other?

Thanks I’ll check it out.

No the 10 objects are dependant on other objects, objects which amount can range from 1 to 4, for now.

Basically if Object A or multiple A’s are near Object B or B’s, Object A’s values should change and if they are not, Object A’s values should change also. For example when A is near B, A’s target value should change to negative or positive based on B’s value. And if A is not near B, A target value should change to positive and constantly update the second value towards the target value in both cases

I hope that makes sense

Hey NukeCorruption. I think the key thing you’ve said here is that you’ve changed tick interval to 10 seconds, and could set it to 1 minute if you need to. This seems to confirm that you actually do not need these updates to be done on tick at all. Like SchnitzelDude says look into Custom Events or Event Dispatchers. The later parts of this video may help understand how and also why you should avoid the tick here if possible.

Edit - bit of a crosspost there.

I have used some custom events but I’m not sure how to use them for updating values constantly or how to call them on set intervals. I’ll check out that video though if it gives me any insight. I’m not really familiar with Blueprints yet but I do know a decent amount of C++ so maybe this should be done in C++, though I’m not sure where to start with that on the UE C++ API

use timers.

Sounds like you might possibly be wanting to detect when something is in range…

One approach for that is to use a collision sphere, and detect in on overlap.

This requires no tick at all… but depends on what you are doing.

Yeah, I’d use timers, they don’t always make a big difference and aren’t millisecond accurate, the engine recognises a tick as 0.033333333 for it’s physics calculations, so that could be a good starting point. The only way I’ve done it is by having that as a constant value and multiply it’s input into a timer for a bit of control over “per-frame events”

Alright thanks, timers sound like what I’m going with