playMaker

Author Topic: Saving ingame FSM states.  (Read 1710 times)

Messjuh88

  • Playmaker Newbie
  • *
  • Posts: 5
Saving ingame FSM states.
« on: December 12, 2012, 09:32:57 AM »
Hello Playmakers!

I have a Level consisting of different rooms/scenes. All scenes have GameObjects with FSMs in it.

For example: I have a room with a shining lamp in it that can be switched off by the user.
After turning the light off, some GameObjects in that scene show reactions to the darkness (like playing different animations, or changing their textures).
If I leave the scene and come back after a while (same game session), the situation should remain the same as when I left it (the light should still be turned off and the responding GameObjects should still show they reactions to the situation).

How can I set, that the GameObject and its FSM (and process state) gets preserved when I leave the scene and find it in the same state, when i come back?

Once the saving issue is solved, I want to show different icons in my level selection menu, symbolizing the current state of the Level (5 possible states/icons till completion).
Any helpful ideas experiences for this...?

I´d appreciate every little help!

Thanks a lot!  :)

Messjuh88

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Saving ingame FSM states.
« Reply #1 on: December 13, 2012, 08:54:24 AM »
Hi,

 for this you will need to use some serialization system as well as integrating these cases within your FSM.

You should start with experimenting with this:
http://whydoidoit.com/unityserializer/

bye,

 Jean