A couple of useful macros: Loops Per Tick

While Loop Per Tick

It will be awhile before I can test this, so I can’t guarantee it will work right now. If you see any room for improvement let me know! :slight_smile:

Looks reasonable! For some reason I always forget that while loops exist. I don’t use a single one in the toolkit, though I’m sure it would make sense many places :stuck_out_tongue: Maybe having another one around will serve as a reminder.

My previous experience with while loops has shown that using them can be risky since you can drop into an infinite loop pretty easily.

As I research pathfinding among other things I see them in use quite frequently however, especially with ordered arrays/lists.

Altering the structure of an array while it is in the middle of a foreachloop has been problematic, but a while loop should allow more flexibility.