"Restart Layout" question

0 favourites
  • 3 posts
From the Asset Store
Logo Quiz with 150 prepared logos and answers, automatic question and answer mixing
  • This isn't really a bug (I think) nor is it something I need help on (now that I know how this event works)...so this seems like a fitting sections for this post...

    I'm simply wondering if Restart Layout is supposed to destroy all objects. This caused me some unexpected "bugs" in my capx until I realized what was going on when I ran that action. On one hand, it does make sense. If not destroyed, then the objects remain and it's hard to reset the layout from the beginning with the prior objects still there. However, as I said, this resulted in some unexpected consequences, namely because I have other events that check for when certain objects are destroyed while the game is running. That resulted in some variables having incorrect starting values when the layout restarted.

    It would seem to me that Restart Layout shouldn't give On Destroyed any "heads up" while resetting everything.

  • This isn't really a bug (I think) nor is it something I need help on (now that I know how this event works)...so this seems like a fitting sections for this post...

    I'm simply wondering if Restart Layout is supposed to destroy all objects. This caused me some unexpected "bugs" in my capx until I realized what was going on when I ran that action. On one hand, it does make sense. If not destroyed, then the objects remain and it's hard to reset the layout from the beginning with the prior objects still there. However, as I said, this resulted in some unexpected consequences, namely because I have other events that check for when certain objects are destroyed while the game is running. That resulted in some variables having incorrect starting values when the layout restarted.

    It would seem to me that Restart Layout shouldn't give On Destroyed any "heads up" while resetting everything.

    I'm not sure, but I use Save when the layout start like:

    on start layout or after some event, save a new slot name "repeat_level", if I need to reload everything because the player lost, just recall the "repeat_level".

    but I'm not sure if is the best way, I never use restart layout in my "experiments" for now

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ribis - That's a feature I haven't explored using yet. Still much to learn...but that's definitely something I should explore as it'll probably come in handy for the bigger project I'm working on.

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