Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Abelius on June 01, 2021, 08:45:08 AM
-
Hi there,
As the title implies, I'm trying to set a local Fsm String var by using the Set Fsm String action, instead of the Set String Value.
I do this, because I want to run a loop to get those variable names (there are quite a lot), and then set their values according to the loop logic.
This works when used on a "proper" FSM, but not when used inside a Sub FSM.
Looking into the action code I can see it searchs for an FSM component (?), and then runs a FindVariable method, so finding by name is possible.
So, I guess a Sub FSM it's not really a full FSM that could be found, right? Therefore it's not possible to take this approach to find a local variable name in a SubFSM.
Is there an alternative way to reference the running SubFSM?
Thanks.
-
Hi.
By Sub FSM do you mean templates used with Run fsm action?
I can't find any Sub FSM action or component.
-
Yup, that's it.
Edit: I've been using Run FSM for a while and observed some other side effects of doing so, like not been able to switch to the Variables tab without a ton of errors showing up on the console.
I'd also like to know why that happens (it makes troubleshooting variables in ran template FSMs much harder), but in this specific case my question is about how to "find" the ran template, so I could reference the local variables on it.
If that's even possible, that is.
-
Hi.
i don't think you can reference a run fsm.
What i do is use Set Fsm (int/float/etc.) action and set it on a variable where the run fsm is on, or on a certain 'Meta Data' gameobject/fsm
Then i can reference it from other fsms.