hubs
hubs copied to clipboard
BG - For Loop node indexes don't end at the expected value.
Description
The wording on the For Loop node suggests it loops while index is less than or equal to endindex, but the actual result is it only loops while index is less than endindex.
To Reproduce Steps to reproduce the behavior:
- Add a behavior graph with a
Startnode. - Connect the
Startnode to aFor Loopnode. - Set the
endindexproperty on theFor Loopnode to 3. - Connect the
For Loopnode'sloopBodyoutput andindexvalue to aDebug Lognode. - Export the file to a GLB and drop it in a behavior graphs room.
- See the console logs print 0, 1, 2.
Expected behavior The console logs should print 0, 1, 2, 3
Hardware
- Device: Laptop
- OS: Linux
- Browser: Firefox
Additional context
While this is standard behavior in many programming languages it isn't standard behavior to people unfamiliar with programming languages (like many artists), plus programming languages often spell out what is happening like so for (let i = 0; i < 3; i++) { while the node does not.