Pausing and Unpausing and also Menu System

Get help using Construct 2

Post » Fri Jun 29, 2012 9:50 pm

fyi, I think the fade out problem might be because you got rid of my family behaviors. I'll try putting those back in.
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Fri Jun 29, 2012 10:01 pm

Hmm, I didn't touch any of the family behaviours, only removed the object timescale events. I'm not quite sure what's supposed to happen in your game, so it's a bit difficult to know if I broke something.

Anyway, if you encounter any problems after you've cleaned up my mess, I'll be happy to have another look.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Fri Jun 29, 2012 10:15 pm

ok first of all please you really need to learn basic 0.0 also if this is starter of a game ill not play it because its too long and ill get bored and close it really...

ok now lets talk about some stuffs you have really mess it!
if you are using the text as a picture why you need a text object just use an image like and put the text inside of it and use sprite object...
also if you are using sprite object there is something called animation!
this animation can hold alot of frames (of course he can hold all you text+sprites) so put all your stuffs on 1 object and put the speed of animation to 0 and after than you can use frame in the sprite properties change frame 1,2,3....etc.

ok now to the pause problem i would say you MUST put a gruops for pause and unpause:
so you have a button if i clicked it will active that pause gruop and if you clicked resume it will inactive pause gruop and active the unpause gruop and so on..

PAUSE GRUOP MUST HAVE TIME SCALE = 0 OR SLOWER THAN GAME!!!
some people put some buttons on the screen while the game on pause like mute,options,exit...


LAST THING AND THE MOST IMPORTANT YOU MUST NAME ALL OF YOUR WORK WITH GOOD NAMES THAT "WE" CAN EASILY USE IT LATER.
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Fri Jun 29, 2012 10:23 pm

can anyone translate that?

seriously, you obviously didn't read my first post where it links to the post saying what my project actually is...it's an interactive graphic novel. If that doesn't appeal to you, then you don't have to read it.
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Fri Jun 29, 2012 11:39 pm

alright, I tried making the events in layout a group, then set it to deactivate when menu is set to 1. that didn't work, so i tried to deactivate it when the pause button is clicked...that didn't work. everytime, the captions still fade out. also, in layout two, there is a part where a new panel fades in over the layout. if you hit pause, the panel still fades out. it is supposed to pause too, dammit! oh, this is so frustrating.

here's the capx again, the only thing I added are aesthetic things that control the buttons continuing to move after timescale is set to 0.

I've added comments to help explain what is supposed to happen, and what happens instead

http://philipcomposer.com/comic/unnamed.capx

thanks
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Sat Jun 30, 2012 12:54 am

Instead of setting the object timescale to 1, use the 'System: Restore object time scale' action to set it back to the game timescale.

Explanation: You've got the overall game timescale and then each object can have it's own timescale. You're setting the object's timescale to 1 to get it to show. When you pause the game you set the game timescale to 0 but the object still has it's own timescale of 1 so it keeps running.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Sat Jun 30, 2012 1:06 am

I understand you completely here ramones. However, when I restore more than one object timescale, the system appears to crash. Nothing happens. I think I might need a completely different approach. Is there anyway to have a fade in and out effect for each frame of an animation?
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Sat Jun 30, 2012 4:39 am

Alright folks. I've solved the elusive pause/unpause problem. Wanna' know how it's done? You guessed it...instance variables for every freakin' object in the program. Yuck. But it works.

I've put comments on everything in the hud and layout entry sheets to explain how it works as best as I can. Unfortunately, I believe I will have to do this for every layout/object...some serious time consumption coming my way.

I have a new, yet smaller problem now. If I pause and then unpause in layout 2, the layout repeats before moving onto layout 3.

(ignore the problem of layout 3 disappearing at the beginning for now, this is probably something easy compared to the other problems)

Thanks to all who posted something useful, namely Nimtrix and ramones for giving me ideas, and thanks to the manual for explaining instance variables!

philipcomposer.com/comic/wayofthesaxcapx.capx
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Sat Jun 30, 2012 4:48 am

ok, here's the demo (should just load automatically from the link)

http://www.philipcomposer.com/comic

there's still some minor problems like I haven't added the menu button on layout 2, the return to layout from menu isn't perfect, etc. but this is a long way from where it was this morning!
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Sat Jun 30, 2012 4:08 pm

I think the instance variables are overkill :) Have a look at this. I just changed 'Event Sheet 1' and disabled the timescale stuff in 'hud'.

wayofthesax1.capx
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: christina, WhosWho and 20 guests