Knowledge base
Knowledge base
Knowledge base
Free, anonymous browsing of Unreal Engine Blueprint examples, node references, and best practices. The same content the WoalzCraft plugin uses to generate Blueprints.
22 results for iteration
Macro. Iterates each element. LoopBody fires per element, Completed fires after all.
ForEachLoopUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoADD: Array Add (Target Array=MyArray, New Item=newElement). READ: Array Get (Target Array=MyArray, Index=i) → use 'Item' output. FIND: Array Contains (returns bool) or Array Find (returns index, -1 if not found). REMOVE by index: Array Remove (Target Array=MyArray, Index=i). REMOVE by value: Array Remove Item (Target Array=MyArray, Item=value). ITERATE: ForEachLoop(Array=MyArray) → 'Array Element' output is the current item. LENGTH: Array Length (returns int). Key: Array nodes operate on the array BY REFERENCE — always connect the array variable directly.
Exec outputs: 'Loop Body' (fires each iteration) and 'Completed' (fires after last iteration).
ForLoopUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoForEachLoopWithBreakUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoIterates over every element of an array, executing the loop body once per element. Use ForEachLoopWithBreak if you need an early exit.
Exec outputs: 'Loop Body' and 'Completed'. Data outputs: 'Array Element' and 'Array Index'.
ForEachLoopUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoPattern: GetAllActorsOfClass(ActorClass=BP_Enemy) → ForEachLoop(Array=OutActors) → Loop Body → CastTo<BP_Enemy>(Object=Array Element) → Cast Succeeded → [do work on enemy]. ForEachLoop exec in='execute'. Exec outs: 'Loop Body' (each element) and 'Completed' (after all elements). Data outs: 'Array Element' (current item, wildcard type) and 'Array Index' (int). GetAllActorsOfClass output is 'OutActors' (NOT 'ReturnValue' or 'Actors').
An ordered list of values of one type. Add/Remove/Find/Get by index. Pair with ForEachLoop for iteration.
Macro. WARNING: can cause infinite loop if condition never becomes false.
WhileLoopUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agostring