Layer visibility after restart

0 favourites
  • Problem Description

    Layer visibility is not changing to default value after restart/change layout.

    Description of Capx

    Very crude example with excessive use of button objects showing how layers visibility is not reset after layout restart/change

    Steps to Reproduce Bug

    • Preview
    • Click on button to set "box" layer visibility to "invisible"
    • Click other button to go to second layout (I used "go to layout" instead of restart for better visual representation, but effect is the same)
    • On layout 2 click button to go back to previous layout.

    Observed Result

    After setting layer visibility to different one from default value (from visible to invisible and/or vice versa) this layer will keep its visible state after restarting layout or switching to different layout.

    Expected Result

    Layer visibility should reset to default state after restarting layout. So if layer is visible and you make it invisible at runtime by events it should switch back to visible (default state) after using "restart layout"

    Affected Browsers

    • Chrome: YES
    • FireFox: -
    • Internet Explorer:-

    Operating System and Service Pack

    Win 7 64bit SP1

    Construct 2 Version ID

    r165

  • Closing as won't fix. It's trivial to workaround, and changing how this works will likely just break lots of existing projects in confusing ways.

  • Closing as won't fix. It's trivial to workaround, and changing how this works will likely just break lots of existing projects in confusing ways.

    huh? can you explain a bit more?

    If you are not going to fix it - regardless your reasons - you should at least add a warning tooltip.

    Because if you RESTART a layer you EXPECT that layout to go back to its original state, in every and all aspects.

    So either fix it or place a warning inside editor. otherwise be prepared that more people will come here and report this issue.

  • Irbis - where would the warning go and under what circumstances should it appear in such a manner that it is not a simple irritation to those whom the problem does not affect? It is not trivial even to display a warning, and the workaround is trivial, you just need to throw in a 'set layer visible' action.

  • Irbis - where would the warning go and under what circumstances should it appear in such a manner that it is not a simple irritation to those whom the problem does not affect? It is not trivial even to display a warning, and the workaround is trivial, you just need to throw in a 'set layer visible' action.

    In "Go To Layout" and "Restart Layout" system actions tooltip + Layer Visibility tooltip

    Ashley, believe it or not but not all C2 users are reading forums. Left alone being instantly teleported to this thread when they spot this problem.

    If i would be a new user, and i would use those system actions i would be very suprised and i would try and find a bug in my events that is cousing this. I would think it was my mistake, somewhere. Then after minutes or hours of checking my project events i would go here and report it as a bug.

    Or just get pissed.

    I would never have gues that its a well known issue which the C2 devs are aware of.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There's probably a lot more state that isn't reset by jumping layout. It would be difficult to list everything in a useful way.

  • There's probably a lot more state that isn't reset by jumping layout. It would be difficult to list everything in a useful way.

    Huh? What else doesn't reset?

  • I'm not actually sure, but presumably all other layer properties, effect parameters, global objects, persisted objects, any other global state like project settings, global variables, storage, music playback, in-flight network requests, etc. In fact it's easier to list what it does change: it just destroys all objects and re-creates the initially placed objects from the layout view. All other state is global.

  • I'm not actually sure, but presumably all other layer properties, effect parameters, global objects, persisted objects, any other global state like project settings, global variables, storage, music playback, in-flight network requests, etc. In fact it's easier to list what it does change: it just destroys all objects and re-creates the initially placed objects from the layout view. All other state is global.

    and this should be added somewhere. really.

    that was the biggest pain with CC remember? Poor documentation. Now its a lot better but still from time to time issue like this arise.

    Maybe just write a quick guide in tutorials section? You can even copy/paste what has been said so far in this thread. So if people would bump into some troubles - that guide would popup in their google search.

  • Irbis - I agree with you 100%. I'm a noob and still have my Construct training wheels on. I went in with the same expectations you had...the layout and all layers on said layout would be reset to they're original state. I'm using a number of layers and finally realized it wasn't resetting them back to the initial visibility.

    I don't mind if the product isn't updated but I would really love to see a note on this behavior in the manual. It isn't mentioned on the layout, layers, or system actions pages. It really makes the most sense on the system actions page since that is where 'go to layout' and 'restart layout' are mentioned. Neither of which reset back to initial visibility of layers.

  • I hope in Construct 3 we won't have this issues. It's not intuitive at all!

    Everything in the layout is reset to initial state except the layers and if you want something to persist there are a couple of options like the persist behaviour and the global attribute. So.. it's really confusing, not to mention the double work you have to do, setting every single layer to visible and invisible.

  • I hope in Construct 3 we won't have this issues. It's not intuitive at all!

    Everything in the layout is reset to initial state except the layers and if you want something to persist there are a couple of options like the persist behaviour and the global attribute. So.. it's really confusing, not to mention the double work you have to do, setting every single layer to visible and invisible.

    Why have you posted in a 2 year old closed bug report?

    Not only does your post not contribute to the OP it specifically says NOT to post here.

  • I bumped on this very same problem about layer visibility just 2 days ago and I can say that I'm also disappointed that this doesn't even mentioned in the manual.

    I spend whole yesterday trying to figure out what was I doing wrong. Tried with different settings, different methods, I read manuals about layers, system action/expression, etc. all with same result. Jeez, it even cross my mind to rewrite everything because I wasn't sure if the bug was coming from corrupted save file. That would have set me back a week worth of works. This should have been mentioned in the manual.

  • Ashley I know it's an old and closed report, but can you please update the Layer manual page to let users know that the "Initial visibility" don't reset after the layout restart? It shouldn't take more than a minute. It would be fine if you only publish the update with the next stable release.

    I just found myself in that situation where I didn't know how my project does what it does and I couldn't find any actions related to setting the layer visibility. I searched the manual and I found this topic. This is the second time as I recall, because when I first started the project I had this issue as well. Logic dictates that the layer will set it's visibility each layout start based on it's setting in the editor, just like objects do.

  • I am totaly lost.

    What are we talking about ? The layer visibility check mark in the Layout Editor ?

    Or the Initial visibility property of a layer ?

    Those are 2 different things, btw.

    When i use 'Initial visibility' ( a layer property, same logic as a sprite property), the layer is invisible on start and on restarting the layout.

    What do i miss ?

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