Forum rules - please read before posting.

Next scene and previews scene buttons for interactive book pages.

Hi! I am doing somthing like a interactive book. And I want to make two buttons for navigate between the pages. Every page is a different scene in my project.

With adventure creator I can switch scene with scene number or name, but is it possible make it automatic for switch from scene 3 if player is in scene 2 with a "next button" and switch to scene 1 with "previous button". Obviously this would have to work for any scene number we are in.

Thank you and sorry for my english level :s

Comments

  • You can do it with custom scripting:

    public void NextScene ()
    {
        AC.KickStarter.sceneChanger.ChangeScene (AC.SceneChanger.CurrentSceneIndex + 1, true);
    }
    
    public void PreviousScene ()
    {
        AC.KickStarter.sceneChanger.ChangeScene (AC.SceneChanger.CurrentSceneIndex - 1, true);
    }
    

    Place that inside a new C# script, add to an empty and make it a prefab. You can then trigger its "NextScene" and "PreviousScene" functions by referencing the prefab in an Object: Call event Action.

  • It just works! Thank you so much Chris! You saved me lot of time!

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.