Forum rules - please read before posting.

Open Locker atop of the current scene.

Hi,

I was searching this forum, but can't find the answer...

Say, I have a locker (or any other kind of container) in my scene. My character "Use" it and it "opens" into image with some items inside to take into the Inventory. Is it possible with AC? I understand that it can be "opened" like a new scene, but how do I do it in the same scene, just like a small window atop of the current scene?

Thanks!

Comments

  • As in, a close-up overlay that appears on top of everything? And would this be 2D or 3D?

    There's a couple of ways you can do this:

    1. Add all the overlay sprites / Hotspots etc to the scene, but in a hierarchy of its own (i.e. all parented to the same GameObject). You can then hide it from view, and use the Object: Teleport Action to move it in front of the camera when you wish to show it, and another such Action to hide it afterwards.

    2. Add the content in a new scene, and add it in as a sub-scene to the "main" one by using the Scene: Add or remove Action. The main scene's camera will be unchanged, meaning you'll have to position the content in the same position that they'd be in were you adding them in the original scene.

    In both cases, I expect you'd be wanting to prevent player movement, as well as the ability to interact with the main scene's "normal" objects. Player movement can be disabled with the Player: Constrain Action, while a Collider placed on the Default layer behind the added Hotspots but in front of the regular ones (relative to the camera) should block clicks to them.

    I'm assuming this is a 2D game, in which case you'll have to set a larger Z position of your added Hotspots than the "normal" ones to ensure they get priority when clicking.

  • Excellent! Thank you for suggestions Chris, I'll try them both.
    Yes, this is a 2D scene.

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.