This example file expands upon a technique Shawn demonstrated in an application for MMF2. Due to a new feature in Fusion 2.5, it is now possible to create an active object by name, which reduces the number of events required to reconstruct a level.
Here's the original example post.
My version works in a very similar way.
> Array Level Builder 2.5.mfa
I have made some changes:
1) Each active object used in the level building must have a Group Qualifier to identify it as before.
2) It uses two alterable values. "A" is used to uniquely count it. "B" is used to define what type of object it is (background, obstacle, platform, ladder or active)
3) An alterable string is used which has an EXACT COPY of the active objects name. This is because at present there is not an expression to retrieve the active objects name at runtime. Have raised a feature request for this in the bug tracker so hopefully we will get this in the future and then we will not need to use the alterable string. *EDIT* - the latest BETA of Fusion now has this feature, so perhaps I will update this soon.
4) On the level building and construction frames I have a counter object to define what room number to save/load the data from in the array (rooms/levels are referenced in the Z index)
5) I am storing each property in the Y index of the array as text. It's possible some optimisation could be done by using just one Y index and combining the properties as a single string.
6) On the level construction frame I no longer need a paste object because Fusion now allows creation of an object by it's name.
I have added comments in the frame and event editors. It's not very complicated but if you have any questions please post here. If you have any improvements or good ideas, please post those too.
I have also made a tilemap widget, the advantage of the widget is you could make a level editor to be used in game or by people who do not have Fusion but otherwise it solves the same problem of building levels in one frame. However, I really like this technique demonstrated by Shawn as it fits in well with Fusion and although levels/rooms can only be constructed at edit time by someone who owns Fusion, its simplicity and flexibility is quite appealing.
I've not tested this on Android or iOS exporters yet, so it may need some further optimisation.