Forum rules - please read before posting.

Splitting a scene into chapters

edited September 2021 in Technical Q&A

Hi there

I am experimenting with a murder mystery / whodunnit type of game and I would like to split it into several chapters. All these chapters would take place in the same location. Certain actions and triggers would progress the story and trigger the chapter changes.

One thing I can't wrap my head around is how I could go about designing these chapters without messing up my scene. NPCs would be in different locations for each chapter, items too, and I would also have minimal geometry changes (like, say, a broken window glass). I would like to jump between the different chapters while editing, and I would also like to quickly jump while playtesting.

I know that one option would be to build different scenes in Unity but that would mean maintaining different instances of the GameEngine including NPCs, etc., which doesn't sound like the best approach to me because (most of) the NPCs exist throughout all chapters.

I could also have multiple scenes active, with one containing all the AC stuff and the other ones any possibly changed geometry. But that only gets me so far, it doesn't help with the NPC positioning, for example.

Which other possible options exist?

Thanks for your help!

Comments

  • edited September 2021

    If you rely on the same scene file across all chapters, it is going to be more complicated to work with.

    You could feasibly use an Animator or Timeline to make the necessary cosmetic changes to your scene graphics, and then play back the correct animation in your OnStart cutscene based on e.g. a "Chapter number" Variable.

    If these changes are more than purely cosmetic (e.g. changes to Hotspot / NavMesh placement) though, I'd recommend splitting the scene into chapter-based variant.

    When it comes to moving NPCs between scenes: if you enable player-switching in your Settings Manager, and then assign each of your NPC characters as Player prefabs (you can convert a character's "type" via the NPC component cog menu), then you are then able to move these characters around using the Player: Teleport inactive Action.

    Essentially, you'd be making all your NPCs potential Player characters, but never actually doing so. But once a character is listed as a Player prefab, AC will then keep track of their position in the game (across scenes) automatically.

    You'd have to remove these characters from your scene files so that AC can spawn them, but you can then reference them directly in any Action with an "Is Player?" checkbox. You'd also have to update their Hotspots to trigger ActionList assets when interacted with, but it's also possible to convert a scene-based ActionList to an asset file via the same component cog menu.

    A video covering this feature can be found here.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.