Get time between two triggers?

End goal is to provide time between multiple sequential triggers firing so time between trigger A firing and then Trigger B, then trigger C, theres about 120 triggers, hence the spaghetti.

The times ideally need to be recorded therefore would need an array of sorts but I can’t hook this up.

tbh I’m not sure what a function with shared values is?

All that spaghetti (somewhat captivating) seems redundant. Is this what you’re after:

https://i.gyazo.com/b49286a6135fb272…4a3bc9d9fb.mp4

The top bit creates and measures time between triggers. Each trigger is an actor that dispatches *itself *to the LevelBlueprint. The struct array keeps track of the index, trigger object reference and time elapsed since last trigger. You can add more data there, of course.

The *Tick *code at the bottom is just for drawing debug text so you probably do not need it at all.

edit: forgot to rename the *AddNextTimer *event, this will fire when your run out of time

Thanks for that everynone, as such do you need to add custom triggers to the map or will the ones already in there function with this code?

Anything can be a trigger, it’s up to you. In this case, it’s an actor with a simple cube:

You seem to be doing everything manually, consider doing something similar with your overlap node. What the dispatcher does here is send a notification to anything that has registered with it. In this case it’s a custom event in the Level Blueprint. This way, it does not matter how many triggers you put.

Let me know if you have any issues with this.

I will do, I massively appreciate the help, many thanks!