Helpful macros

These are pretty basic convenience macros, but I use them a lot (maybe too much), so I thought Iā€™d share. I placed these in an object macro library so I can use them everywhere. I hope they come in handy for someone :slight_smile:

While (with break)
Pastebin: http://blueprintue.com/view/PwxSJUM_/
Description: Just like a while loop, but with break

Do While (with break)
Pastebin: http://blueprintue.com/view/LnPxRxeY/
Description: Do once and repeat while the condition is true (or break)

SafeGetArrayElement
Pastebin: http://blueprintue.com/view/iLvCTIcb/
Description: Get an element from an array, branching if invalid
518bcc8030e1cde6bde7febd71fc4e69937700c9.jpeg

SafeGetRandomArrayElement
Pastebin: http://blueprintue.com/view/AplzivYQ/
Description: Get a random element from an array, branching if invalid
b505023ed7b36099e229a04a7032bf1a6558930f.jpeg

MakeBoolFromBranch
Pastebin: http://blueprintue.com/view/ApxBhHpB/
Description: Convert a true and a false branch into a boolean

SetBoolFromBranch
Pastebin: http://blueprintue.com/view/SF04rzr6/
Description: Set a boolean value given a true and false branch

Counter
Pastebin: http://blueprintue.com/view/nlh2WkYD/
Description: Keep count of the number of times this node has been executed

Reverse For Each Loop With break
Pastebin: http://blueprintue.com/view/iKl0aZn7/
Description: Loop through array elements in reverse
24ace802780652dc2958c47958f5f193c366cf74.jpeg

1 Like

Reserving

Added a few images and a new macro