restart layout, doesn't really restart.

0 favourites
  • 9 posts
From the Asset Store
In this template the music plays without looping in your game
  • In my game (like bubble shooter), i added a button to restart the current level then with "restart layout" action. But this don't restart the layout, infact all the balls are destroyed, so them are counted!!

    Maybe this is not a bug, but i think that a restart MUST really restart.

    Sorry my bad english, please help me!

  • Please see how to report bugs.

    Please post your capx and if you're unsure this is a bug, you might want to rather post in the "how do I" forums to request help with your project.

  • I do not think it is necessary to post my capx. I want know why on restart leyout, all sprite are destroyed

  • All non-global objects are destroyed when changing level or restarting a level. This is by design, since restarting a level ought to revert the level to its initial state. Closing since this does not sound like it's a bug. Provide a .capx if you wish for us to investigate further.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can post my .capx, but is for an android game, so I do not want to be made public!! Can I send it to one for fix the restart?

  • The problem is: when the balls are destroyed, they add money, mana and kill to me (thehe are global varibles), so on restart of layout the give me as mana, noney and kill as balls I have. For resolve this, I thought to deactive this group on layout restarted, but then does not come back active! why??

  • Add another global variable called inPlay or something that makes sense to you, update the logic of your scoring, etc... to only function when inPlay is set to true. Then update your button logic so that when they hit the button, before it calls restart layout, it sets inPlay to False. Then have an event on layout start that sets the variable to true so that you can continue with your score, etc...

    Hope that helps for your situation.

  • Ok, it work ;) thanks for help.

  • No problem, glad it worked for you.

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