pausing

0 favourites
  • howcome when i add a set value the pause no longer works

    global number "Pausetime" = 1

    <font color=orange>

    first condition    Keyboard on "P" pressesd

    second condition   system    pausetime = 1

        1st Event      system    set time scale to 0

    first condition    Keyboard on "P" pressesd

    second condition   system    pausetime = 0

        1st Event      system    set time scale to 1

    </font>

    this works fine accept it doesnt let you unpause so i added an event

    <font color=orange>

    first condition    Keyboard on "P" pressesd

    second condition   system    pausetime = 1

        1st Event      system    set time scale to 0

        2nd event      system    set "pausetime" to 0

    first condition    Keyboard on "P" pressesd

    second condition   system    pausetime = 0

        1st Event      system    set time scale to 1

        2nd event      system    set "pausetime" to 1

    </font>

    Now it doesnt even want to pause what do i do to fix this

  • Can we not get a screenshot of the conditions so it's easier to resolve?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • i cant paste urls

  • ?

  • working one not unpausing

    s10.postimg.org/hgw2s68w9/image.png

    not pausing at all

    s10.postimg.org/arpjc5nk9/image.png

  • just add http:// becuase i dont have enough rep to add pictures

  • Add in a system wait of 0.1 seconds before the Set Pausetime actions and see if that resolves it.

  • it still doesnt unpause :/ and i tried mixing up the orders

    i know this is a dumb question but does the event sheet still run while paused?

  • Yeah events will run every tick. Time scale just slows down the gameplay I think.

  • so must i just try pause and unpause in a different way?

  • If you want to pause gameplay, I did this by setting up a group in the event sheet that disables everything, then I enable this group when I'm pausing.

  • The trouble in the second example at it is that it runs the first event, which pauses the game and then sets the 'pausetime' to 0. Then it checks the condition of the second event which goes "Oh, 'pausetime' is 0, need to unpause!".

    Here's a capx with 2 different examples of how to get around this sort of issue. I would very much recommend you get used to using the 'else' condition - it will make life much easier when you start getting into some complicated picking later on!

  • oh ill try ill make a sprite pop up on pause and i have tp press to unpause but for now i set pause on p and inpause on u but thanks for all the help

  • pause.capx

  • thanks black and tobye really helps

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)