Split Flow Node
Welcome to Portals United! / Forums / Requests & Feedback / Split Flow Node
- This topic has 3 replies, 2 voices, and was last updated 1 month, 1 week ago by
robert.malzan.
-
AuthorPosts
-
May 23, 2025 at 12:17 pm #1613
Hi,
I am trying to create a “Split Flow” node that can trigger multiple nodes at the same time but I am having problems.I’ve tried it like this, but the second output doesn’t execute.
protected override void MakeIO(NodeFileEntry nodeFileEntry)
{
m_FlowInput = Inputs[0];
m_FlowInput.DisplayName = "Flow In";
m_FlowInput.RunAction = RunMultipleOutputs;
m_FlowOutput1 = Outputs[0];
m_FlowOutput1.DisplayName = "Flow Out 1";
m_FlowOutput2 = Outputs[1];
m_FlowOutput2.DisplayName = "Flow Out 2";
}
private void RunMultipleOutputs()
{
Debug.Log("[SplitFlow] Triggering first output");
// Set the active output to the first one
m_CurrentOutput = 0;
// This will trigger the first output
Run();
// After completing the first flow, run the second one
Debug.Log("[SplitFlow] Triggering second output");
// Now switch to the second output
m_CurrentOutput = 1;
// This will trigger the second output
Run();
And I’ve tried using:
RunFlowOutput(m_FlowOutput1);
RunFlowOutput(m_FlowOutput2);
But I’m getting errors.
I don’t believe the system was intended to activate multiple flow outputs at the same time. Is there any way to bypass this and make a Split Flow node that can activate multiple nodes at the same time?
Thank you.
May 27, 2025 at 5:03 pm #1633Actually, the second method should work RunFlowOutput(m_FlowOutput1) …
What are your error messages?
However, why not create a task node with 2 (3, in your example) tasks? At the end you just call “Next Task” and you get almost the same result, except that the second flow is executed 1 frame later.
May 28, 2025 at 10:15 am #1643I haven’t thought about using tasks, I’ll try that!
Maybe we can set up a meeting next week so I can show you the errors I get when using multiple flow outputs at the same time with RunFlowOutput(m_FlowOutput2).June 4, 2025 at 4:34 pm #1660I tried using multiple flow outputs in the way you are trying to use it and also got errors. It seems that at runtime, you (currently?) cannot call RunFlowOutput(). However, you might be able to call theNextNodesInput = FindInput(m_FlowOutput1.InputReference) if the flow output has a vaild reference (HasValidReference(m_FlowOutput1) is true if that output is connected to something)
Then you “manually” call the inputs Run action as in theNextNodesInput.Run(); I think this should work.
-
AuthorPosts
- You must be logged in to reply to this topic.