Hello guys,
my problem is that I need many delays at the same time, but they aren’t connected. So they will expire at different times.
For example, I have a delay in an event and when this event starts, the delay starts, too. But when I call the event again, a new delay or a new event must be created.
If there is no way to do this with events, is there a way to do that with functions?
The main answer I need is:
A way to do exactly that or a different way to do the same thing.
If it’s possible give me screenshots with a blueprint code.
Would you mind giving a concrete example of what you’re trying to do? It might help people understand the problem you’re trying to solve.
I need to call many instances of this event and I don’t know how to do that. That’s the best example I can give.
You could do something with a DoOnce, where your event fires into a DoOnce node, then your Delay timer will start, then on the delay timer’s completion you could hook up a sequence node, with the first sequence firing into the rest of your string, and the second sequence pin firing back into your DoOnce node’s reset pin so that the script is re-usable.
Cheers!
Sry but that doesn’t work, because this doesn’t create a new delay.
This is old, but I had a similar problem and could not easily find a answer.
I had an event that ran through a bunch of timelines to create light flickers on a dynamic material instance.
But If I called the event for one actor while It was still running on another It would break… I wanted to be able to have - like you requested multiple instances of the event.
So what I did was copy the entire event multiple times, for my purposes 6 times was enough. Then I set a bool at the start and end of each event. When I needed to call the event I just ran through some branches to find which event was free based on the bools and fire that one. You could possibly scale this further with many events but I don’t know how bad the performance impact would be.
For dealing with an over time logic there is many ways to do it but in my opinion here in your case . it is more simple to execute it this way.
creating a component is more ideal way. super simple to create and add component to your actor it does it’s job and after that you can destroy it or keep it if you need it. Timeline component made by Epic it has its own use cases for sure.
and you can make your own component and you don’t have to use any CPP if you are more comfortable with BP
create a child from actor component a event with float input in it and add delay and connect that parameter to the delay node.
again not an efficient way to do it but it is simple and clean enough for now since you are prototyping i guess.
Cheers!