Hello there.
I'm going to highjack and necro this thread at the same time, because it's the first result that shows when searching for this in Google.
there is no use case for this as far as I am aware
I can think of one, at least.
I don't know if at the time of this post the action "Set FSM Variable" existed or not, but you can pass a string variable to the var name...:
And if you can do that, you can also use that string to reference that variable, at a later time, with the action "Get FSM Variable".
Now, when I saw these two actions I kind of took for granted "Set FSM Variable" would create a local FSM variable on it own, in case it doesn't find a premade one... but that's not the case. It throws an "not found" error instead.
In my case, I was going to use that feature inside loops, to create temporary debugging variables. So yeah, it would be nice if a new one would be created.
I understand you could argue that's not useful enough, or that this can be made in other ways (as it always is the case in coding), but I think this would be a nice option to have, regardless.
Would it be possible to modify the Set action so it creates a new local FSM var? Is this possible at all?
Thanks.