Ok... so I did what made sense to me, if it is not sound, I'll change the design.
1) Emotions overlay is now shown on the say screen itself, it is always there, only not showing anything in it's default state.
2) If not apparent from the above, it needs to be put in it's default state when not used. It is done with:
$ interactions_portraits_overlay.change("default)
command. This design should be superior to showing on overlay screen with auto-hide on grounds of:
- with overlay, it is not possible to have the last animated state persist for options like scared, animation would have to be run every time, which is annoying (or more options would be needed).
- when/if required for animation to persist over multiple say statements, it would have to be called over and over again...
- On say screen version allows better degree of control/customization.
3) I've adjusted all atl instructions to make more sense/be more succinct.
4) My new UDD class called DisplayableSwitcher was used. It can do some really cool stuff like pausing/resuming animations, adjust it's state based off variable, being updated even between interactions, resetting animations and prolly some other stuff.
5) In order to pick animation:
$ interactions_portraits_overlay.change("love")
Love can be called like this, it's a repeated animation so we don't really care from which point we start.
$ interactions_portraits_overlay.change("sweat", "reset")
Sweat in the other hand has an endstate and must be called with reset, when called without in out setup (other cases may differ), it will go to it's last state.
Other animations like anger are judgement calls...
==>
I think this is it, it is a sound design, you'll never see these animations if say screen is not shown and as long as we don't forget to reset, everything will be fine.
I should prolly do one more adjustment to prevent the say screen to show this when there is no portrait... so narrator can be used without having to default it. I'll also look into merging this with portrait overwrites (I really like this concept). That way we can use it both with overwrites and this add-on overlay system.