Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: westingtyler on December 23, 2016, 04:29:20 PM
-
Out of curiosity, is there a simpler way to do this kind of repetition?
You can't save a string then set an FSM variable by name- it has to be manually selected, it seems.
In the example above, I need to do operations to 12 fsm variables, in order. all that changes here is that a number increments (including the fsm variable name).
-
just a number increments each time, until all have been gone through and operated on.
-
I've moved on from that approach to just store most of my persistent variables in arraymaker arrays and hash tables. As far as I know there's no way to create new variables inside an FSM in runtime. So iterating through variables with an index integer (then int to string + add to the variablename) and getting their values from an array/hash table is the best solution for this imo.
That also makes it easier to save/load with easy save. (you can find arraymaker and actions for easy save/array maker on the ecosystem)