Hello guys!
I have no experience in Adventure Creator but I'm considering it for my next project. It's gonna be a 2D side-scroller adventure with autogenerated levels, that consist of randomly arranged rooms. This means that there'll be a step on start of every game session, when I have to instantiate those rooms from prefabs. Each room will have a set of navigation grids, cutscenes, triggers, hotspots and all of these things that are usually sorted by different folders in Adventure Creator hierarchy. So I have two noobie questions:
1) Is it neccessary to keep the AC game hierarchy? Can't I just have a number of folders, such as _Room1, _Room2, _Room3 each with the full hierarchy of AC subfolders inside?
If it's not possible, I think, I'll be able to create a script, that will put different parts of the room into the main hierarchy tree. But there is another question:
2) In my game I'll have to instantiate some AC objects on Start of the scene, or maybe during other steps of the game. Won't it brake the AC logic? Will it work?
Comments
2) For performance, AC keeps an internal record of all scene objects that need updating/referencing during gameplay in the StateHandler script. This is done automatically when the scene begins, however you will need to run this function manually if you add objects through script. It's a simple matter of calling:
AC.KickStarter.stateHandler.GatherObjects ();
Also, You might encounter issues with save file restoring unless you load in the objects before AC's SaveSystem script's OnLevelWasLoaded function gets called - which I'd imagine you can remedy by altering your script's Script Execution Order.