playMaker

Author Topic: Restore FSM State / Save FSMs and load when loading scene  (Read 3882 times)

Nimred

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
    • Timecraft Games
Re: Restore FSM State / Save FSMs and load when loading scene
« Reply #15 on: September 24, 2015, 02:50:43 AM »
Hi there,

I actually took another look at the problem today and noticed that while the "ActiveState" of an FSM cannot be modified, the "StartState" can...

I did a quick test, and successfully jumped to a chosen state in Awake(), without going through the true start state.

Code: [Select]
myFSM.Fsm.StartState = "State 3";
In order to use this for real, I will just make some scripts to regularly save to a file the current states of all ingame FSMs, and possibly also global and local variables, which are also modifiable.

I'm glad there's a solution after all :)


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Restore FSM State / Save FSMs and load when loading scene
« Reply #16 on: September 24, 2015, 03:34:59 AM »
Hi,

 I am waiting for 1.8 to go public so that I do one action that works always, else it would be tricky.

 Please bump me when 1.8 will be out ok? thanks for your patience :)

Bye,

 Jean

haikugames

  • Playmaker Newbie
  • *
  • Posts: 25
    • View Profile
Re: Restore FSM State / Save FSMs and load when loading scene
« Reply #17 on: March 31, 2016, 12:12:25 AM »
Hello, as 1.8 is in a very stable beta, I was wondering if it will be possible to create this action.  Thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 2254
    • View Profile
    • jinxtergames
Re: Restore FSM State / Save FSMs and load when loading scene
« Reply #18 on: March 31, 2016, 06:03:01 AM »
Hi,
With "Easy save" you can save all and load all (local and Global)
BUT the problem is that it does not do this on "Awake"
and the actions are not editable.
I asked moodkie if he can add a 'on awake' option on his actions.

So for now i made a "PlayerPrefs Get String on Awake" Action
so you can load a string on awake and i made a "set Fsm Start State"
to set a fsm start state on awake. and this seems to work :)

i will add them on the EcoSystem after some more testing

shadowof047

  • Playmaker Newbie
  • *
  • Posts: 15
    • View Profile
Re: Restore FSM State / Save FSMs and load when loading scene
« Reply #19 on: September 20, 2016, 01:47:54 PM »
Bump ,

I'm also interested in this . an action which loads the fsm state would be great .

haikugames

  • Playmaker Newbie
  • *
  • Posts: 25
    • View Profile
Re: Restore FSM State / Save FSMs and load when loading scene
« Reply #20 on: June 01, 2017, 12:37:57 PM »
I don't suppose there is any update to this :) We still want to save and load FSM states.