To execute an event 3 times and then stop

Hello friends, I am new to Unreal and I have a question. I want to execute an event 3 times with a 0.2-second delay between each execution and then stop the event. Additionally, if the event is triggered again using Flip Flop, I want it to repeat the same way. I would really appreciate your help. Best regards!

Here’s a very simple setup. Every time you call EVT_3X it will call EVT_Test 3 times with delay between. Both events will stop on their own.

“Can I build upon this foundation to develop further?”

this wont work if you call the event again though. (unless its complete)

a timer would be better so you can start/stop it, but how do you want your logic to work, if its called again do you want it to restart or do you want it to coexist? ie have 6 tests

2 Likes

“Actually, yes. An event will repeat 3 times and then stop.
If it is called again, another loop of 3 repetitions will start.”

You’ll have a little debugging nightmare on your hands if you call it again while the sequence is incomplete. Why not use a Timer? You get to control it, unlike Delays.

2 Likes

so yes use a timer, you can track the iterations and cancel the timer on complete. if you call it again you set the iterations back to 0

Sorry, yes - better advice from Auran13 and Everynone. But if using a timer and you want the event to be called again concurrently without cancelling (as Auran13 asked earlier), I’m now curious what the solution would be.

if you want it concurrently you’d want an Async task or basically construct an object, run the execution, maybe return a delegate, then cancel the task.

for example the AsyncLoadAsset node

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.