playMaker

Author Topic: Is there a way to 'fast forward' to the middle or end of an FSM  (Read 401 times)

JR

  • Playmaker Newbie
  • *
  • Posts: 1
Is there a way to 'fast forward' to the middle or end of an FSM
« on: December 16, 2022, 12:04:01 PM »
Hi all,

I am writing a save system for a game that uses a lot of playmaker FSMs and I am not sure what to do so that I can load into a point in the game that is in the middle of or after an FSM.

A lot of our game-state is changed by FSMs, and I think I will need to either iterate over the FSM, firing all of the actions as I pass through each state, or write a bunch of code that copies the game state changing functionality of all of the FSMs. I am really hoping to not have to write a bunch of code that copies FSM functionality, but it seems like FSMs weren't meant be fast forwarded through like this either.

All of the SFMs in our game are essentially a straight line, and I am looking for a way to instantaneously fire all of their state changing actions in the sequence they would normally. For things like waits or animations I am ok with them firing or not firing, it shouldn't really matter.

The closest I can see to doing this is the "SetState", function, but I'm kind of hoping to not have to set the state, then wait for the update loop to fire their actions each time.

I hope this makes some sort of sense :/

Thanks,
JR

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Is there a way to 'fast forward' to the middle or end of an FSM
« Reply #1 on: December 17, 2022, 09:34:47 AM »
SetState is probably the closest you can get, i don't see another way for an FSM to remember the state it was in.
Available for Playmaker work