Forum rules - please read before posting.

How to Set Active Scene via Action List When 2 Scenes Loaded

So I am still learning, so I may not be doing this the optimal way, so please let me know if there is another method that would solve this problem.

I have a journal that can be brought up in any scene, where notes are stored, and it's how you can fast travel between scenes. I don't want to recreate everything for that journal in each scene, especially as we continue to make tweaks to it. So, it seemed like the best option is to have it in it's own scene, and then add it to each main scene (via Scene > Add). This is successful, but objects in the scene cannot be Used in an Action List because it's not the active scene. It's ignoring any commands to do things with objects in the Journal scene. From the scene heirarchy, while playing the game, I can set the Journal scene to the active scene, and then those objects can be used. However, I need a way to do this from the action list, where after the journal is selected from the inventory, I set the Journal scene to be the active scene. I'm not seeing any options from the Adventure Creator tools to do this, though.

Am I missing something, or am I just doing this all wrong? Help is appreciated!

Comments

  • edited May 2019

    It sounds like you should be attempting this by using the AC Menu system (Which has a Journal template/functionality built in I believe). I don't have a ton of experience with this. but that's where I would start looking first.

    Maybe this will help?
    https://adventurecreator.org/tutorials/creating-diary-system

  • Thanks for the link! I had thought about a menu, but there will be a ton of functionality built into this, and I wasn't sure how multifacted I could make a menu. But if I can do hotspots and transformations imbeeded in the canvas? Perhaps I could make that work.

  • Welcome to the communuty, @dojogrant.

    There's a few approaches you can take, but it should be possible to run a sub-scene's ActionList. If you'd like to create a new thread with more details (version numbers, steps to recreate, etc) I can look into that separately.

    You cannot currently change which scene is the "main" one, but another approach would be to make the Journal a prefab instead of a separate scene. A prefab can be spawned in the scene using Object: Add or remove. Just be sure to transfer the ActionLists to asset files (click the cog at the top of a Cutscene's Inspector), since ActionLists cannot live in prefabs.

    Following up on @PinheadGames's suggestion, a Menu is also possible - but Diaries / Journals are specifically designed for text and not interactivity. Button menu elements, however, can be made to run ActionList assets when clicked - so they can act in place of a Hotspot/Interaction setup if that's the approach you wanted to take.

  • Thanks for the reply, @ChrisIceBox! Yeah, what we'll have is two pages of a book open, with the right side showing a clickable map that takes you to different scenes, and on the left, a series of character portraits. Click one of the portraits, and it swaps out that left page with a new page that only features that character's portrait and a place where we will add notes for what we've learned from that character (this is actually being used as a lesson replacement in an online 6th grade science course, where students are conducting an investigation into classifications). I've seen the notifications that prefabs can't contain action lists and that they need to be separate asset files, but the ins-and-outs of that have eluded me. Your explanation is fairly clear, so I'm going to dive into that today, as I tested making a menu, and it was looking like it might be even more complicated to replicate our functionality, especially since I want the book asset to move onto the screen via a transform action (the game is "first-person," so you'd see the book slide onto the screen in front of you, with hands holding it).

    I'll let you know how it goes trying the action list assets!

  • @ChrisIceBox Okay, here is the issue I'm running into: I've got the journal as a prefab, and I've started making my interactions as asset list assets, but in the prefab, I'm trying to set a Use interaction for one of the portraits, but for the interaction, I'm unable to drag the action list asset into the Use Interaction slot. If I try to create a new one, it creates one in the scene that I have loaded, but I need the action lists to live outside the scene. Thoughts?

  • @ChrisIceBox Sorry for the spam. I got it to almost work by adding the Interaction script and calling the asset file. I'm using a hotspot to designate a name, and a box collider to specify the clickable area. But clicking it does not run the action. From the inspector, I can click the Run Now button, and it activates, so I'm not sure what's causing actual clicking in-game to make it activate.

  • Nevermind! I was not changing the location of the action lists from scene to asset file. It's working beautifully now. Thanks for letting me talk all this out loud. :) AMAZING TOOL!

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.