Forums › đź’¬ NodeCanvas › ⚙️ Support › [SOLVED]Iterate … just the first item
The iterate decorator pass only on the first item. Why ? It’s a sub BT from a FSM graph.
I have make several tests with another scene with gui Item, Colors string, loop inside another loop … it’s works. But not with my case. I don’t know why.
Thank’s for your help.
With a list of string i have the same problem. Like in the screenshot, it stay like that.
At the first iteration it leave the loop because of the status == running.
And when it come back to the Iterator.OnExecute function: for (var i = currentIndex; i < list.Count; i++){ currentIndex == 0
for (var i = currentIndex; i < list.Count; i++){
And it’s like that all the time.
With another scene it’s works. It reach the last statement of the loop:
I find the reason. The parent FSM call the sub BT at each frame because of the condition in the «FROM ANY STATE»
Hey, I am glad you’ve found the cause of the problem and I am sorry for not being able to reply before the fact! Thank you.