playMaker

Author Topic: Question about pausing time  (Read 1316 times)

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Question about pausing time
« on: January 21, 2023, 09:22:36 PM »
Hello,

I am pausing time with time scale 0 when I pause my game. After you unpause it, I have a 3-second countdown so you can prepare. Because the key you hit to unpause the game is the same as one used in-game, it activates the get key down action (or rewired equivalent). How do I get scale time to not register key presses? I could disable the object or fsm, but disabling the game object results in problems with either reenabling all or none of its children (neither of which I want). I could disable all of the fsms that are causing problems, but there has to be an easier way around this than disabling and reenabling all of the appropriate fsms one by one. I also can't just use a different key for pausing, as it still happens with other keys. Thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Question about pausing time
« Reply #1 on: January 22, 2023, 10:46:11 AM »
Hi.
you can use an Fsm Bool Test (isPaused) after the key down actions to check if paused.

or
You can use global transitions and send a 'Disabled' to set it to a state to disable.
and a 'Resume' to go back to the state with the button

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Re: Question about pausing time
« Reply #2 on: January 22, 2023, 11:31:51 AM »
Thanks for the suggestions. I'll give it a go!