How to loop 3 triggers
Hi,
I am working on a background segmentation.
And I have set the behaviour script to do the following:
Trigger: Raise Eyebrows > Image 1 turns Image 2
Trigger: Raise Eyebrows > Image 2 turns to Image 3
And then I would like the Lens to restart and go back to Image 1.
I can´t figure out how to do it.
My Behaviour looks like this:
Do I need a third Behaviour?
What is the best way to loop 3 Behaviours?
Thanks,
Liane


Hi Liane,
Behavior script doesn't support this on its own right now. But you can use a simple script to cycle through a few Behavior scripts.
Just add this to its own object.
For "Trigger Behavior", hook up a Behavior that has the "Brows Raised" trigger type and "None" response type.
For "Response Behaviors", add all the Behaviors that you want to trigger to this list. Make sure that "Trigger Type" is set to "None" for all of them.
Hope this makes sense. Let me know if you need any more help!
Jacob
Hi Jacob,
Thanks for the support.
I managed to create a lens that circled through following Behaviour Scrips:
Set 1 (Image Mouth) Enabled
Set 1 (Image Mouth) Disabled
Set 2 (Image Lips) Enabled
Set 2 (Image Lips) Disabled
Set 3 (Image Clouds) Enabled
Set 3 (Image Clouds) Disabled
All of them are attached to the users Lips as a test
What I would like to do is to do the following
Set 1 (Image Mouth) Enabled
Set 2 (Image Lips) Enabled, (Image Mouth) Disabled
Set 3 (Image Clouds) Enabled, (Image Lips) Disabled
>
Set 1 (Image Mouth) Enabled, (Image Clouds) Disabled
I tried to put Enable and Disable in one Behaviour Script - But it won´t work.
how do I approach the second use case?
Many Thanks for your Support!
I also tried it out on Background Segmentation with Response Type Animate Image and it worked really well :D Thank you for the script :D
Hey Liane,
I'm glad the script worked for you!
For your other question, here's a variation on that script which will treat all the Behavior scripts on an object as a set, and trigger them all at once. So for each set, you should group all the Behaviors you want onto the same object.
Let me know if you need any more help!