playMaker

Author Topic: Set FSM Variable Question  (Read 629 times)

j0hnbane

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
Set FSM Variable Question
« on: August 29, 2016, 08: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?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14374
  • Official Playmaker Support
    • View Profile
Re: Set FSM Variable Question
« Reply #1 on: August 30, 2016, 03: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:




 Bye,

 Jean