Forum rules - please read before posting.

Make the "Exit Closeup" button work in different scenes

Hello everybody. I am new to the forum so I might have missed if this has already been answered. I have tried searching through posts but not managed to find the answer.

In the official 3D tutorial we made the back button for getting out of the closeup but to my understanding we made it work just in that one particular case. If we have more closeups in the scene or in different scenes we are not able to use it.
How to make an elegant solution for this? The written tutorial mentions that it could be achieved with the use of variables but I am not exactly sure how to do this most effectively.

Thanks in advance. Having a blast working with AC!!! :)

Comments

  • Welcome to the community, @WhiteFeather.

    The "Close up" button is part of a Menu, so the ActionList that runs when clicked is an ActionList asset file - not an ActionList in the scene. However, from within that ActionList, it is possible to use the ActionList: Run Action to then run a Cutscene inside the current scene.

    When an asset-based Action references a scene object, it creates a "Constant ID" component that generates a unique ID number. This is used to help the asset "find" the object once the scene is closed/opened again. Try it with just one scene and you'll see what I mean - you can have the ActionList asset file's ActionList: Run Action refer to a Cutscene (that handles the scene-specific "exit close up" operation), and that Cutscene now has an ID number associated with it.

    Now this asset only refers to this Cutscene by ID number. It's not aware of what scene it's in - just that it needs to look for a Cutscene with that ID in whatever scene is currently open. This means that if you were in a different scene, and there was a different Cutscene with that same ID number, then this Cutscene would be referenced by the asset file instead!

    Constant ID numbers can also be set manually, so here's a step-by-step guide to how you'd do it:

    1. Create your "Exit close up" Cutscene in your first scene
    2. In your "Exit close up" ActionList asset (which is mapped to the menu Button), create an ActionList: Run Action that runs this Cutscene.
    3. Open this Cutscene's Inspector, and find the Constant ID number.
    4. Click Copy number, and open the second scene with another "close up".
    5. Create a new Cutscene for the "Exit close up" in that scene.
    6. Manually attach a new "Constant ID" component to it.
    7. Set this component's Set field to Manual, and paste in the same number.

    The asset file should then run either Cutscene, depending on which scene is open. A tutorial on this technique can also be found here.

  • Thank you very much for a quick reply! @ChrisIceBox
    I will have to play with this and set it up this way. Right now I managed to solve the issue just with checking the "return to last gameplay?" in the camera action and for prototyping it works just fine.

    Thanks once again :)

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.