playMaker

Author Topic: Disable FSM when entering certain scene  (Read 1477 times)

Quantico

  • Playmaker Newbie
  • *
  • Posts: 2
Disable FSM when entering certain scene
« 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

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Disable FSM when entering certain scene
« Reply #1 on: September 27, 2018, 10:12:31 AM »
Hi.
Maybe you could use 'Get Scene Is Loaded' to see if main menu is loaded

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: Disable FSM when entering certain scene
« Reply #2 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).

Quantico

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Disable FSM when entering certain scene
« Reply #3 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"
« Last Edit: September 27, 2018, 01:05:44 PM by Quantico »