playMaker

Author Topic: [SOLVED] Return value to Host FSM  (Read 1828 times)

Geropellicer

  • Playmaker Newbie
  • *
  • Posts: 10
[SOLVED] Return value to Host FSM
« on: January 20, 2018, 02:46:29 PM »
This has already been asked here http://hutonggames.com/playmakerforum/index.php?topic=7098.0 with no official response or solution.

When you run a FSM in only one level of deepness, ie from the original gameobject to the sub Fsm it's easy to return the value with the different "set FSM variables" actions. But when a Sub FSM runs another Sub FSM, it gets much more difficult. Is there a way to return data from the Sub FSM to the Host FSM?
« Last Edit: January 20, 2018, 08:29:28 PM by Geropellicer »

LordHorusNL

  • Beta Group
  • Full Member
  • *
  • Posts: 226
Re: Return value to Host FSM
« Reply #1 on: January 20, 2018, 03:29:18 PM »
Have you tried these actions from the ecosystem yet?

Get Host
Get Host Info

It's been a while since i used them however i believe you can just get the name from the host FSM as a string and use that to send a event and a variable with "Set Event Data"

If i remember i had no succes sending a variable with "Set FSM" but don't quote me on that.


Geropellicer

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Return value to Host FSM
« Reply #2 on: January 20, 2018, 08:29:09 PM »
Wow Big thanks for that one! For anyone stumbling upon the same problem in the future, there is a package called "Sub Fsm Host Communication" that contains an example clearly showing how to achieve all this. Essentially, you use the "Get Host info" action and then pass the variable with the "Set FSM variables" actions, leaving "use owner" as the gameobject and passing the host FSM name as FSM name.