Mutiple Articy Players Playing Same Flow
Posted: Mon 27. Jan 2020, 20:24
So for our NPC's we're handling our AI via Articy. We put an Aritcy Flow Player, an ArticyFlowHanlder script (ours, which handles the OnFlowPlayerPaused() and OnBranchesUpdated() callbacks), and a Behavior script on each NPC. The Behavor stuff is just a simple coroutine that does simple actions with random delays so that all NPC's won't look like they're doing the exact same thing at the same time.
The AI itself is a custom flow fragment, which contains input pins to multiple Behavior fragments that are chosen via global variables. One the Behavior fragment is reached, it calls the NPC's Behavior script to do it's thing. Once the behavior is done, the output pin points to a Jump, which jumps back to the AI fragment. Rince, repeat.
This worked fine when we only had one AI flow object being used at once. However, when we tried using the same AI flow fragment on multiple Articy Flow Player/ArticyFlowHandler objects, they began tripping over each other. It was like every time one of the AI fragments would get to the jump point, it would trigger every other NPC's flow player in the scene that was using the same AI flow fragment, even though they all had their own individual Players.
Is this expected behavior? IE if you have multiple flow players all using the same flow fragment, when the flow fragment changes it calls every single flow player that's referencing it? And if so, is there a way that we can specificy a specific Flow Player that's called from the flow fragment itself?
Thanks!
-Mike
The AI itself is a custom flow fragment, which contains input pins to multiple Behavior fragments that are chosen via global variables. One the Behavior fragment is reached, it calls the NPC's Behavior script to do it's thing. Once the behavior is done, the output pin points to a Jump, which jumps back to the AI fragment. Rince, repeat.
This worked fine when we only had one AI flow object being used at once. However, when we tried using the same AI flow fragment on multiple Articy Flow Player/ArticyFlowHandler objects, they began tripping over each other. It was like every time one of the AI fragments would get to the jump point, it would trigger every other NPC's flow player in the scene that was using the same AI flow fragment, even though they all had their own individual Players.
Is this expected behavior? IE if you have multiple flow players all using the same flow fragment, when the flow fragment changes it calls every single flow player that's referencing it? And if so, is there a way that we can specificy a specific Flow Player that's called from the flow fragment itself?
Thanks!
-Mike