pausing a game with a functioning custom overlay?

For questions about using Classic.

Post » Wed Jul 01, 2015 6:15 am

Is there any way of pausing a game and have an animating overlay on to that isn`t affected by any time adjustments?

while a pause is OK with no animation, if you have an arcade style "CONTINUE" overlay on top of a game obviously a countdown is neeed!!

As always thanks in advance!!
Last edited by work3 on Wed Jul 01, 2015 7:58 am, edited 1 time in total.
B
19
S
6
G
6
Posts: 200
Reputation: 3,413

Post » Wed Jul 01, 2015 6:25 am

Try putting any logic that should pause inside of a group (or include their event sheets under a single group) then disable/enable the group when needed. Other code outside that group will still run.

Hope that helps!

You can also toggle the overlay code disabled during gameplay and enabled when you need it, so they don't interfere with each other.
Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
127
S
43
G
18
Posts: 2,240
Reputation: 20,592

Post » Wed Jul 01, 2015 7:32 am

wow, I had no idea you could do that, let alone disable / enable groups within the app.

will have a play around with that.. Thanks JayJay, you`re always coming to my rescue!!!
B
19
S
6
G
6
Posts: 200
Reputation: 3,413

Post » Wed Jul 01, 2015 7:58 am

After trying it out, it seems that disabling the group doesnt pause bullet movement etc.. I guess that goes for any other behaviours too.
B
19
S
6
G
6
Posts: 200
Reputation: 3,413

Post » Wed Jul 01, 2015 9:40 am

On further research it seems a layout object set to MODAL will pause everything, including bullets etc when you spawn it.

if you assign the object to a layout that contains your overlay etc.. you get a paused game with animating overlay or whatever, and you can kill it again by destroying the object within its own event sheet.

However, I read on previous mentions of this plugin that it is buggy?? is this true? anyone come across any problems with it?
B
19
S
6
G
6
Posts: 200
Reputation: 3,413

Post » Thu Jul 02, 2015 12:10 am

What you could try is enabling/disabling (activate/deactivate) the behaviors as well inside of the respective groups. I would recommend not using the Layout object, but only because I have also heard it is buggy. I've not used it enough to know sadly.

I threw a quick test and find that works for Bullet behavior at least: https://dl.dropboxusercontent.com/u/471 ... eLogic.cap

Hope that helps! :)
Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
127
S
43
G
18
Posts: 2,240
Reputation: 20,592

Post » Fri Jul 03, 2015 9:59 am

Thanks as always Jayjay, you rock.. will take a look ASAP!
B
19
S
6
G
6
Posts: 200
Reputation: 3,413

Post » Sun Jul 05, 2015 3:47 pm

Took a look, and yeah it certainly does the job, but now you've mentioned it works on the bullet object at least, I worry if it would either not affect some other behaviours or possibly even rest their behaviour instead of "halting" it as I add more..

With that possibility in mind, in your opinion, do you think I could come up against issues like that further down the line?

I guess I can get my programmer buddy to take a look at the layout object, maybe he can fix it, or rewrite a custom pause object based on it..

maybe we can come up with a solution once we get past the CS source building issue I mentioned in another post!!!

cheers!
B
19
S
6
G
6
Posts: 200
Reputation: 3,413

Post » Sun Jul 05, 2015 6:51 pm

I think you'll be safe to proceed if you only use the default behaviors that come with Construct Classic, or if the other behaviors have an action to enable/disable them.
Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
127
S
43
G
18
Posts: 2,240
Reputation: 20,592


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests