How do I pause game for 1 sec when object appears and resume

0 favourites
  • 7 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • So on the project I'm working on, I put a "boss spawn" trigger. After 10 enemy kills, a boss appears. What I want to do is pause the game for, say 2 secs -- without any menu popping up or anything (just to let player know that a boss appeared) and resume the game action after 2 secs. I've searched the forums, but most discussion about pause is having menu and user input on it. I just want to make it simple -- Boss appear, pause it for 2 secs, then resume action.

    Please see my code. When the boss spawns, it pauses game indefinitely and it doesn't resume back to regular time scale. Thanks for the help in advance.

  • Put the set time scale to 1.0 on its own event, that should fix it.

  • clarke2509, Thanks for your reply. But, how do I do that? Sorry I'm still new in using Construct 2. System > add event does not have the "set time scale" option.

  • Make a global variable called "Paused". Write 2 conditions:

    Paused = 0 》Set time scale to 1.0

    Paused =1 》 Set time scale to 0.0

    ___________ 》System wait 1.0

    ___________ 》Set Paused to 0

  • I just tested it and because your setting the time scale to 0, you can't wait one second because time has stopped. I'm sure I could find away around this later but for now you can have like a slow motion entry for the boss,

    so set the time scale to 0.1

    then wait 1 second (remember its actually going to be 10 seconds because of the time scale being 0.1)

    Then set time scale back to 1.0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • TheDom, thank you. I actually played around with it a bit. Turns out I like it in slow-mo better (when the boss appear) instead of just "pausing" the entire action. clarke2509, TheDom, Thank you both! Your help is very much appreciated.

  • Yes, sorry. I should have realized that. Alternatively you could put all objects into a family and use the System Time Scale Object instead.

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