[SOLVED]Iterate … just the first item

NodeCanvas Forums Support [SOLVED]Iterate … just the first item

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #13855
    gandi
    Participant

    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.

    Attachments:
    You must be logged in to view attached files.
    #13863
    gandi
    Participant

    With a list of string i have the same problem.
    Like in the screenshot, it stay like that.

    Attachments:
    You must be logged in to view attached files.
    #13865
    gandi
    Participant

    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

    And it’s like that all the time.

    #13866
    gandi
    Participant

    With another scene it’s works.
    It reach the last statement of the loop:

    Attachments:
    You must be logged in to view attached files.
    #13868
    gandi
    Participant

    I find the reason.
    The parent FSM call the sub BT at each frame because of the condition in the «FROM ANY STATE»

    Attachments:
    You must be logged in to view attached files.
    #13879
    Gavalakis
    Keymaster

    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.

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.