Hi Jean!
I'm SO sorry for the crazy late response, notifications for this thread were off for me I guess? xD but this is still something that I would find super useful!
The main use case would primarily be for manager objects, where instead of interacting with a component to manage things (like using a hash table to keep track of how many units there are of a certain type and recording their stats) you could instead create the variables for those units on scene loading, and so long as you had a deliberate naming scheme, interacting with an FSM would be infinitely easier than a component
I know for me personally I usually end up having a lot of my data loaded in through hash tables, but it gets pretty messy to manage/interact with. Especially at run time, when you're getting and setting keys constantly.
For instance, say you have a 'FSM.UnitManager' and its whole goal is to keep track of unit stats in a level. Like how many kills, deaths, etc each type of unit has in a scene. You could create all the variables needed for each unit, and then since the game objects themselves have names, you can automate using a key system to interact with that data, so then all you'd have to do is use the regular actions like 'Subtract FSM Int', and then use the key (which would come from a build string) for the variable name.
This is my current setup though!
HashTableProxy
----------------
blue_archer_countStart
blue_archer_countEnd
blue_archer_countCurrent
blue_archer_kills
blue_archer_deaths
blue_crossbowman_countStart
blue_crossbowman_countEnd
blue_crossbowman_countCurrent
blue_crossbowman_kills
blue_crossbowman_deaths
red_bandit_countStart
red_bandit_countEnd
red_bandit_countCurrent
red_bandit_kills
red_bandit_deaths
And while my current setup *does* work, every time I need to set something on the hash table, I have to check if the key exists, and if it goes, get the Int, then add to the Int, then set the Int. It just seems like a lot of leg work for something that an FSM could handle easily if it could just create variables at runtime xD especially because I'm generating from a library of units created at runtime, not a bunch of prefabs (because they all share the same basic setup).
Let me know what you think, I know my example might sound niche, but I know you see the value of creating variables at runtime in general
-craigz