I am trying to spawn many objects with a small time delay in between. In other visual scripting software, I can easily do this with a For Loop that contains a Wait node inside it. However, I seem not to be able to do this with FlowCanvas. The For Loop will go until it hits the Wait node and then iterate again, completely skipping the Wait node and anything afterwards. Is there something special I need to do to get this to work? The documentation says absolutely nothing at all about For Loops or Wait nodes and I could not find any answers online.
The For Loop node makes all its iteration out calls in the same frame. When a Wait node is called multiple times, the calls are queued or filtered (depending on the invocation mode set in the inspector please see here) .
The following flowscript uses a For Loop and Wait nodes. It will instantiate 10 cubes each one after a short delay (0.84 seconds) because of the Wait node.
I’m wondering if part of the problem here is that I’m making a state machine that is combining NodeCanvas + FlowCanvas. The issue I’m running into is in a sub flow graph in my state machine. I was not able to get any combination of for loop + wait node to work properly. I was able to work around it by instead using a behavior tree where the repeater + wait in a sequence worked correctly, although obviously that is not ideal.
Author
Posts
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.