Xlinka / Project-Obsidian

Project Obsidian: A Resonite plugin adding extended Protoflux nodes and features for enhanced functionality and user experience
GNU General Public License v3.0
16 stars 6 forks source link

Add Iteration output to While and Async While nodes #26

Closed 5H4D0W-X closed 3 months ago

5H4D0W-X commented 5 months ago

📊 Protoflux Node Request

Describe the new Protoflux Node you'd like to request:

Iteration output on While and Async While nodes

Use Case

Iterating over slot children to find something and stopping when done, anything else that requires an index for how many times the loop has run

🚀 Proposed Implementation

Increment internal counter after every cycle and expose that with an int output

📋 Related Issues/PRs

https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/413

paradoxical-autumn commented 3 months ago

I've added the requested nodes (in my branch) but there's something you should know: Due to a Resonite limitation, you cannot plug the output of a node into any node on the input side, so you cannot do i < 10 directly, you'd need to write i to a local variable and check that instead.

ex. not_allowed allowed