Waiting for to finish before continuing foreach loop?

So what I wound up doing is go away from using For Each Loop, and instead utilize my entity’s tick. In there I have a “Busy” toggle.

When not busy, if I still have items in my array I will toggle busy to on and process the first item in my array. On completion I toggle busy off again, and I am able to process the next item in the next tick.

I’ll leave this question up for a little longer to see if anyone else have alternative suggestions.

1 Like