Forum rules - please read before posting.

Return to previous scene

Is there a way to change the scene to the previous scene without knowing the name or number?  I have a book that I want to display when an inventory item has been collected. My plan was to switch to the scene showing the book when the inventory item was selected. Replacing the journal was a menu item that was intended to return to the previous scene. Everything worked well when everything was in one scene and I was just switching cameras but now I have additional scenes. 

I discovered the journal tutorial when searching for an answer but the book scene has some nice graphics.

Comments

  • Can you just implement the book as a menu instead of a separate scene?

    Either that our write the scene number of the last loaded scene to a global variable on "use" of the inventory item and you can use that to load back afterwards? 
  • You can use the Engine: Check scene Action to check the previous scene, and follow it up with an Engine: Change scene Action to go back accordingly (e.g. "if the last scene was Basement, load Basement).

    However, that will quickly get complicated as you add more scenes to your game.  The following script command will load the previous scene:

    AC.KickStarter.sceneChanger.ChangeScene (AC.KickStarter.sceneChanger.previousSceneInfo, true);

    You can place that line within the Run function of a custom Action, and run that Action in place of AC's regular Engine: Change scene Action.
  • Thanks.  I'll give that a try.  For now, I'm using the journal asset.  The main problem I have is that whenever I click on the page right and page left arrows, the player character moves right or left respectively.  Is there something I missed in setting things up?  It is a 2.5D point-and-click game.
  • If you need to disable any of AC's systems (in this case, Movement and I'd imagine Interaction too), you can use the Engine: Manage systems Action.

    Place this in an ActionList Asset and run it when you open the journal.  If you need to run it through script, you can call the AC.AdvGame.RunActionListAsset function.
  • That worked perfectly!  I put it in the action list and then re-enabled everything with a stop reading button.
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.