23) The Layout system is a little weird.
I'm currently working on an in-game menu, where you can see your stats, inventory and stuff. Pretty simple, the events are:
On 'Menu' pressed : System - go to layout 4 + System: Set global variable 'Menu' to 1
I used Go to Layout and I have to use a number - which is kinda weird, cause if I create an inventory I'll probably just create a layout called 'Inventory' and wanna use 'Inventory' in the 'Go to layout' command and not a number that doesn't even display anywhere
On 'Menu' pressed + Is global variable 'Menu' equal to 1 : System: Return to previous layout + System: Set global variable 'Menu' to 0
The problem is that 'Return to previous layout' doesn't go to the 'previous' layout, but to the layout one number ahead of the 'menu' layout. So my 'menu' is on 4 and if I invoke this event it goes to event 3 - And not back to the previous layout.
So, wouldn't it be cool if we would have a system command that'd say: "Temporarily go to Layout 'String'"?
So we could have an event that'd temporarily change layouts. And in those temporary layouts, we could set things up so it switches back to the 'previous layout' when another event occures. For a menu, it'd be if the player presses the 'menu' button again.
This'd be perfect for stuff like an inventory and for cutscenes / timeline events. Or is there a smarter way to do this right now?