Restart group action

Get help using Construct 2

Post » Sun Sep 23, 2012 7:25 pm

Hi guys!

I was reading this post: http://www.scirra.com/forum/restart-layout-game_topic50562_page2.html and could see that i'm not the only one who needs a "Restart group" action. Do any of you guys if there have come a solution yet?

I made following event:
On clicked "try again" -> reset global variables
                                  -> Go to layer "Game" (The same layer as before)
                                  -> And then is like I need a action here maybe a "reset group".


Have a nice evening everyone! :-) Knudsen2012-09-23 19:27:19
B
10
S
1
G
1
Posts: 30
Reputation: 1,339

Post » Sun Sep 23, 2012 9:16 pm

I don't get what you want to do, but have you tried instead of Go to layout "Game".. go to a blank layout, and in that, set On start of layout >> Go to Game
maybe that can fix your problem

Image
B
42
S
11
G
5
Posts: 269
Reputation: 10,880

Post » Sun Sep 23, 2012 10:20 pm

Hi Danuyos :-)

I have just tryed your suggestion with the layer, but that dosen't help Unfortunately :-(
I have made a Ghost Shooter game, where there is a counter so all the groups first become active after 5 sec - groups like movement, spawn and so on. When I die and I click the reset botton all groups are still active, so there is a little problem :( Therefore could it be great if there were some kind of reset group action, like there is reset global variables and reset layout.
B
10
S
1
G
1
Posts: 30
Reputation: 1,339

Post » Sun Sep 23, 2012 10:51 pm

On clicked "try again" -> System: Reset global variables to default    
                      -> System: Restart layout
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Sun Sep 23, 2012 11:01 pm

Still dosen't work, but thanks for your suggestion Shinkan :-(

http://d.pr/i/5mjJ - here is a screenshot
B
10
S
1
G
1
Posts: 30
Reputation: 1,339

Post » Sun Sep 23, 2012 11:06 pm

I double checked that and it works. Resets all global variables and all groups to default state.

Maybe there's an issue with your event?
Could you share a *capx to see what's going on there?
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Mon Sep 24, 2012 12:02 am

Or maybe try
When you click "reset", reset global variables, then set all the groups inactive, and then go to layout

and also check your counter-set groups active , is that condition "if counter >=5 set group active?".. try =5 or add "once while true"... probably the engine keeps activating the group every tick after the "5" and thats messing with the groups
Image
B
42
S
11
G
5
Posts: 269
Reputation: 10,880

Post » Mon Sep 24, 2012 10:54 am

Hi again guys :-)

I have tryed to change a bit in the eventsheet, but could still not find a solusion :-(

But here is the Capx. https://dl.dropbox.com/u/84869704/The%20grp%20reset.capx the reset layout is event 48 - Thanks again guys! :-)
B
10
S
1
G
1
Posts: 30
Reputation: 1,339

Post » Mon Sep 24, 2012 5:58 pm

Time = 8
Time = 5

That's why it's not working. It counts time from start of your game not layout. So every time you restart your layout Time will never be 8 or 5 again because this value is not resetting.


ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Mon Sep 24, 2012 6:12 pm

Ah okay. Do you know if there is a way to let the whole evensheet reset when i tab on restart? Also the timer? :-)
B
10
S
1
G
1
Posts: 30
Reputation: 1,339

Next

Return to How do I....?

Who is online

Users browsing this forum: armaldio, blackhornet, makkancs, TiagoCesar, Yahoo [Bot] and 17 guests