Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Quantico on September 27, 2018, 08:33:44 AM

Title: Disable FSM when entering certain scene
Post by: Quantico on September 27, 2018, 08:33:44 AM
Hi, this is probabbly a basic question, but I have pm for a couple of days, so still reading.
I have a state and action in a prefab (clone character) to unlock an achievement (props and bodies). The  FSM is very simple, just a "Became Visible" state and the unlock action.
The thing is that its a multiplayer game, so when entering a scene, the other players props will be visible too so its unlocking the achiev.
How can I have this fsm active only on the main menu scene and disabled on the other scenes?, thanx  ;D
Title: Re: Disable FSM when entering certain scene
Post by: djaydino on September 27, 2018, 10:12:31 AM
Hi.
Maybe you could use 'Get Scene Is Loaded' to see if main menu is loaded
Title: Re: Disable FSM when entering certain scene
Post by: Thore on September 27, 2018, 11:44:05 AM
Hi, this is probabbly a basic question, but I have pm for a couple of days, so still reading.
I have a state and action in a prefab (clone character) to unlock an achievement (props and bodies). The  FSM is very simple, just a "Became Visible" state and the unlock action.
The thing is that its a multiplayer game, so when entering a scene, the other players props will be visible too so its unlocking the achiev.
How can I have this fsm active only on the main menu scene and disabled on the other scenes?, thanx  ;D

You could also set a bool inMainMenu, set this to false by default, and something else in main menu flips it on for usage (and false afterwards).
Title: Re: Disable FSM when entering certain scene
Post by: Quantico on September 27, 2018, 11:50:41 AM
Hi, thanks djaydino, that must be it, but not working, it is unlocking when other scenes are loaded, what could be wrong? I now tried with a disabled state too (scene loaded -false), but still unlocks...

Edit: Thanks Guys , Solved with "Scene Found event"