Link to .capx file (required!):
Steps to reproduce:
1. Add a sprite and add an "on destroyed" event.
2. In that event have another object get created.
3. Then make an event to change or restart the layout.
When the layout changes the object created in the "on destroyed" event still exists.
I would expect no objects to survive a layout change unless they were global.
Internet Explorer: untested
Operating system & service pack: Vista sp2
Construct 2 version: 149
I glazed over the observed result. This is an issue with Construct 2.
I forgot to search for existing bugs and was informed about this existing one:
I think given my comment from the linked bug report, this should not be fixed otherwise we will create another infinite-loop bug. Based on that, closing as won't fix.
Cool deal, I should have searched before posting. I may end up using this eventually anyway. It's an interesting way to make an object on the next layout without making the object global.
Develop games in your browser. Powerful, performant & highly capable.
I would perhaps avoid relying on this kind of behavior - it's a sort of edge case thing that might change in future.