playMaker

Author Topic: How to use Playmaker to resume a suspended Scene after an interruption[SOLVED]  (Read 1232 times)

playmakertester

  • Full Member
  • ***
  • Posts: 211
Let's say there are five Scenes.

1-1
1-2
1-3
1-4
1-5


The stage starts from 1-1 at startup.
If a user kills the game in the middle of a 1-2 stage, and then starts the game again, the game will resume from the stage where the game was stopped in 1-2.

What combination of actions would you suggest to make this happen? It would be helpful if you could let me know.
« Last Edit: October 20, 2020, 11:28:36 AM by djaydino »

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to use Playmaker to resume a suspended Scene after an interruption
« Reply #1 on: October 11, 2020, 01:10:19 PM »
I thought I could use Playerprefs, but then I felt like I needed an empty initial Scene (i.e. a Scene that is called at game launch) with no camera or object.

Any advice on Playmaker's FSM, actions and Scene configuration on how to get the Scene to resume automatically?

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: How to use Playmaker to resume a suspended Scene after an interruption
« Reply #2 on: October 11, 2020, 01:30:42 PM »
Load scenes as Additive

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to use Playmaker to resume a suspended Scene after an interruption
« Reply #3 on: October 11, 2020, 02:28:07 PM »
Thanks heavygunner,

I'll give it a try. Thank you.

By the way, does this mean increasing the Scene In Build number?

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: How to use Playmaker to resume a suspended Scene after an interruption
« Reply #4 on: October 11, 2020, 02:30:52 PM »
Thanks heavygunner,

I'll give it a try. Thank you.

By the way, does this mean increasing the Scene In Build number?
Check this

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to use Playmaker to resume a suspended Scene after an interruption
« Reply #5 on: October 11, 2020, 02:32:17 PM »
Thanks heavygunner!

Let me check video ;)

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to use Playmaker to resume a suspended Scene after an interruption
« Reply #6 on: October 11, 2020, 02:49:48 PM »
I watched the video.

This seemed a bit different from what I wanted to do.
If I do this, it seems to take over assets from the previous "Scene".

What I want to do is to always load the last Scene I played, even if I stop the game task.

I know it's a lot of work, but if you know of another way to do it, please let me know.

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: How to use Playmaker to resume a suspended Scene after an interruption
« Reply #7 on: October 11, 2020, 02:57:54 PM »
I got you.
have an empty scene which decide what scene shoudl load. When every time you complete a scene add 1 to an int variable. eg : levelNumber.
Then, add "Playerprefs Set Int" action and assign that variable in a key. Make sure that scene and it's level number match with index in buil settings

Now, in empty scene, use "Playerprefs get int" and save it on an int variable and load scene action. Set that int variable in level index

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to use Playmaker to resume a suspended Scene after an interruption
« Reply #8 on: October 11, 2020, 03:14:52 PM »
Thank you!
So I'll give it a try!

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to use Playmaker to resume a suspended Scene after an interruption
« Reply #9 on: October 11, 2020, 04:13:22 PM »
It worked fine!
Thank you!