edited March 2022 in Makinom Scripting

I'm having some trouble understanding how to use the Loop node in a formula.

This is my most basic setup. My expectation would be that the Value node would loop 3 times, giving a final output of 3 once the Loop is finished. However, when I test the formula it appears to continue infinitely, and my editor freezes.

Can you see what I'm doing wrong?

Thx :)

Update: I've noticed it works fine if I set the counter to be Global instead of Local - is that normal? It feels like it should work with a Local counter also, no?

Post edited by StevieJay on
  • Additional update:

    I also get the same problem if I try to do it manually, like I used to do in Ork 2. The version below also works fine with a Global counter variable, but not if I use a Local.

    On the other hand, the Ork 2 version underneath works fine with a Local counter variable.

    I guess there's some nuance between the Variables in Ork 2 and Ork 3 that I'm missing?


  • Yeah, that's a bug with local variables in formulas - at least in the editor, potentially also in-game (depending on how the formula is used).

    Will be fixed in the next update.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Ah, okay - thx :)
Sign In or Register to comment.