The forum on this site is closed for new comments and posts. Continue the conversation in the new forum, and learn more here.

Block all possible triggers for an interval of time, after an initial face event is triggered?

  • Hey Georgie,

    How are you triggering these events? Are you using the behavior script? The Trigger template? Or are you using your own custom script?


    Comment actions Permalink
  • Hey Ben,
    I’m using the behavior script to trigger all events. I don’t have any java script programming background, so I’m using templates as a starting point and building my lens studio project from there. I was able to figure out using the behavior script, but found it limiting in certain scenarios. Any advice on how to block other triggers until the animation plays in its entirety?

    Comment actions Permalink
  • Yeah, unfortunately, this would require a little bit of custom scripting. What you could do is make each of the triggers set to Allow Once, so they will only happen one time. The downside to this is that the users wont be able to trigger them over and over again, they will have to re load the lens each time.

    Comment actions Permalink
  • Ben, I hear you on the “Allow once” behavior script option, thanks for all this information! How long would it take me to learn enough coding skills to make a custom script? Days, weeks or months? I know you do YouTube tutorials do you have anything on this topic that could help me?

    Comment actions Permalink
  • Hi Georgie Boy, Ben Knutson,

    Jacob made a great example on how to deal with multiple triggers and making sure they don't collide here:

    Alternatively, you can have an object for each face trigger, and then have an additional behavior script to enable/disable the other ones.


    For example: let's create two objects: one to hold Brows related behavior scripts, and the other to hold mouth opened related behavior scripts:


    First we can create a behavior script that fires all other behavior: 


    Then on that same object we can do some action on this trigger, in this case print a message:


    Finally, we'll create two more behavior scripts to disable the Mouth Listener object when brows is raised, and re enable it after some delay so that the Mouth Trigger won't activate if brows were just raised. 


    Can't wait to see what you both come up with!



    Comment actions Permalink
  • Hey Jonathan, 

    If I'm understanding this correctly, I should be disabling the scene object that holds the behavior scripts, so that when any of the triggers is activated, it disables the other 2 scene objects that hold behavior scripts that allow triggers to interrupt what the user is currently watching?

    I think disabling the behavior scripts for the other triggers while a selected trigger is active could work, although I'm having trouble figuring out how to break out the different scripts on different scene objects, to make this method work.

    Thanks for your thoughts,

    - George 

    Comment actions Permalink
  • Hey Jonathan,

    **Update** Your method worked! I was able to de-collide the various face triggers, by turning off the different script objects that held the behavior scripts I wanted to temporarily inhibit. However, I don't fully understand the "send custom trigger" response type. Why do I need to send the custom trigger at all? I've tried it without that step and it doesn't work.

    Why can't I select:

    Trigger: Face Event

    Event Type: Mouth Opened 

    why does it need to be the "on Custom Trigger": "onMouthOpen" I'm unclear what the difference comes down to. Additionally, do behavior scripts get run in the order they are listed in the inspector panel?


    - George


    Comment actions Permalink

We're here to help! We just need a little bit of information...

What system are you using?

Have you downloaded the latest version of Lens Studio?

Please download the latest version of Lens Studio. If you still run into this issue, please come back and report it!

Is this issue causing Lens Studio to crash?

What system do you run Lens Studio on?



Follow the next steps to help us solve your issue:

  • Copy and paste this text into your TerminalCommand Window
    open ~/Library/Preferences/Snap/Lens\ Studio/ %LOCALAPPDATA%\Snap\Lens Studio Copy Text
  • Press ReturnEnter to run the command. The Lens Studio folder will automatically open
  • Prepare to upload your files: zip the "Log" Folder by right-clicking and choosing "compress."
    Locate the Log.txt file right above it.

    Attach a screenshot of the issue:



What is this most relevant to?

Please enter a brief description of your issue:

Thanks for submitting this issue.

Unfortunately, it's likely due to the operating system or hardware you're using – since they don't meet the system requirements for Lens Studio.

Still, we hear you loud and clear, and are logging the issue in case there's ever a workaround we can provide!

Minimum Requirements

Operating System: Windows 10 (64 bit); MacOS 10.11+

Hardware: Minimum of Intel Core i3 2.5Ghz or AMD Phenom II 2.6Ghz with 4 GB RAM; Intel HD Graphics 4000 / Nvidia GeForce 710 / AMD Radeon HD 6450 or better; screen resolution of 1280x768 or higher

We'll try to resolve this issue as soon as possible. Thanks for letting us know about it!

Keep an eye out for a followup email from us. We may have a couple more questions for you, or we might already have a solution to offer.

Happy creating!