Mouth open script
I'm not a programmer, but I'm stuck trying to figure out how to make a script that starts a different rain of objects every time a mouth is open.
ie. if the mouth is open there is a rain of apples, if the mouth is open a second time there is a rain of oranges, and if it is open a third time then there will be bananas and so on. hopefully, there is an easy way to achieve this.
thanks for any help!
Hi Diego Povdea,
To do what you're after, you could use some Behavior Scripts, as shown in the Screenshots below. So you create a Scene Object and then attach a Behavior Script to it via the Inspector Panel, set it to the Settings Shown, and then add in your Custom Triggers (I just used Mouth_1, Mouth_2 , Mouth_3 for ease of use and example).
And then Create another 3 or however many Empty Objects for the styles you need and attach a Behavior Script to them, then setting them to react to the Custom Triggers (Mouth_1, Mouth_2 , Mouth_3, whichever count of the Mouth Opening it is) and if you don't need them to stay active for each count (If you want to hide the other Objects), you can then Create more Behavior Scripts for each of the Objects / Mouth Openings where it will Disable (Hide them), but will then activate once their called again via their own Custom Trigger / Behavior Script, hope this helps.