playMaker

Author Topic: Variable Name to String + Run FSM Template Variable Name to String  (Read 2293 times)

craigz

  • Beta Group
  • Full Member
  • *
  • Posts: 234
    • Haven Made
Is there currently a way to convert the actual inputed variable name to a string? (so if you create a BOOL called 'check_siegeEvent_sent' the action could store that name to a string variable)

Only tricky part is wanting to use the name of the variable thats inputed INTO a Run FSM Template, rather than the name of the variable IN the template.

Example:

FSM Host Variables:
check_seigeEvent_sent [bool]
check_liberateEvent_sent [bool]
check_freeVillagersEvent_sent [bool]

Run FSM Template Inspector Variables:
eventBoolToCheck [bool]
setEventBoolName [string]

So if inputed the host variable 'check_liberateEvent_sent' bool into the 'eventBoolToCheck' on the Run FSM, I'd hope to use the action in the Run FSM to store the 'check_liberateEvent_sent' bool as a string to 'setEventBoolName' to then be used in a Set FSM Bool action later in the template.

Let me know if this makes sense, I think it would be SUPER useful and make using Run FSM wildly more reusable, essentially doing what 'Get Host Info' is doing, but on the variable level. Would also be super useful for manager/data gameobjects that need to perform actions on external game objects from global events.

:)

-craigz

Abelius

  • Junior Playmaker
  • **
  • Posts: 68
Re: Variable Name to String + Run FSM Template Variable Name to String
« Reply #1 on: April 15, 2018, 11:30:22 AM »
^

I'm also interested in this. Specifically, a way to store a local FSM variable name as a string.
Unity 2019.4.9f1
Playmaker 1.9.7f1

Abelius

  • Junior Playmaker
  • **
  • Posts: 68
Re: Variable Name to String + Run FSM Template Variable Name to String
« Reply #2 on: April 19, 2018, 10:07:06 AM »
Please, could someone clarify if this is possible already?
Unity 2019.4.9f1
Playmaker 1.9.7f1