Restart group action

0 favourites
  • 12 posts
From the Asset Store
11 loops of RPG, chiptune/8-bit music. Suitable for any pixel art game.
  • Hi guys!

    I was reading this post: 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! :-)

  • 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

  • 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.

  • On clicked "try again" -> System: Reset global variables to default    

                          -> System: Restart layout

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

    d.pr/i/5mjJ - here is a screenshot

  • 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?

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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. dl.dropbox.com/u/84869704/The%20grp%20reset.capx the reset layout is event 48 - Thanks again guys! :-)

  • 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.

  • Ah okay. Do you know if there is a way to let the whole evensheet reset when i tab on restart? Also the timer? :-)

  • No. The timer counts from begining of your game. Make a timer by yourself and then you could reset any time you want.

    For a simple timer. Create new global variable "my_very_own_timer"

    System: Every tick -> System: Add dt to my_very_own_timer

  • Thank you so much guys, your suggestions and support finally lead to the result I was looking for!

    Have a nice day! :D

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