Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: myyokeisheavvy on April 30, 2020, 04:06:46 AM

Title: Keep state between scenes?
Post by: myyokeisheavvy on April 30, 2020, 04:06:46 AM
I'm doing a small adventure game where I have a few rooms inside of one building. The game starts with a dolly shot and fade in after the main menu. My problem is moving from room to room (each room is its own state) and when coming back to the main hub the fade in and dolly replaying. Is there a way to store that an FSM has finished between scenes?
Title: Re: Keep state between scenes?
Post by: djaydino on April 30, 2020, 05:12:21 AM
hi.
you could for example save a int variable and when you start in main menu you can check that int (int switch) and target the room state
Title: Re: Keep state between scenes?
Post by: ch1ky3n on May 01, 2020, 09:36:42 AM
use bool variable ; isFirstTime = True

So your state will check if isFirstime = True then play the dolly camera and Set isFirstTime = False

so next time you get into the room. Since isFirstTime is now = false, then the dolly camera won't play