Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: j0hnbane on August 29, 2016, 11:22:58 PM

Title: Set FSM Variable Question
Post by: j0hnbane on August 29, 2016, 11:22:58 PM
I feel like I'm asking a lot of questions here, so I appreciate your patience.

I've figured out how to set an FSM variable's name after using a build string.

My question is, how can I call that variable within that same FSM?

I'm creating the variable name/float at start and never loop back to it throughout the state.

Am I supposed to use this outside of the FSM only?
Title: Re: Set FSM Variable Question
Post by: jeanfabre on August 30, 2016, 06:43:53 AM
Hi,

 It looks to me that you should use ArrayMaker and maintain a Hasbtable instead of a series of hardcoded variables.

 however, in your case, yes, simply use SetFsmXXX and target the owner ( which you can get using GetOwner action) and reference fsm name and the name of the variable using your built string. Do you have trouble with this? Set/Get/Fsmxxx works for any Fsm, included self.

However I think your trouble is that you don't want to hardcode the Fsm Name reference right? there is an action on the Ecosystem "GetFsmName" for this:

(http://i.imgur.com/f7F5JBo.png)


 Bye,

 Jean