Face Trigger Disable
Hi,
In the FaceTriggerAnim script there is a Trigger Disable Time, I was wondering if there was a way to take that Disable Time part and apply it to other scripts?
For information on what I'm trying to do, I have several face sprite animations with various delay and fade in and fade outs and am trying to prevent them from constantly triggering if someone keeps opening their mouth. Thank you.
Hi,
Also another ask as to not spam the board:
Can you use the open mouth trigger instead of tap for the fullscreen template and if so how would you do that? And are you able to combine this with the tweening template stuff? Thanks for your time.
Hi PaperTriangles!
Yep! How the Trigger Disable Time works is that it checks the current time and makes sure that it's above the last time it triggered + cooldown period before it calls the animation.
Something like this should work (this script will only print "TRIGGERED" only after 3 seconds has elapsed since it was last triggered):
To use open mouth instead of tap as the trigger, open "FullscreenTemplateState" in the script folder of the Resources panel.
Then in that file, on line 242, replace "TouchStartEvent" with "MouthOpenedEvent". So something like:
function createTouchManager () {var event = script.createEvent("MouthOpenedEvent");
event.bind(function(eventData)
{
if (getTime() > script.stateStartTime)
{
onStateEnd();
}
});
}
Can you explain what you mean by " tweening template stuff?"
Keep up the good work, can't wait to see what you come up with :)
Jonathan
Hi Jonathan,
First: thank you for the help on those scripts they worked perfectly! As for the tween stuff I just wasn't sure if I could layer tween scripts on top of other scripts if that makes sense? I tried it and it looks like you can so for the most part it's solved. Once again thank you for the help on the other scripts though!