Forum rules - please read before posting.

Leave conversation on right click?

Hi,

Is there a way to leave a conversation on right click for example? Rather than having to choose the conversation option that stops the current conversation?

Thanks

Comments

  • The following function will end a Converation:

    AC.KickStarter.playerInput.activeConversation = null;

    You can write a custom script that calls this function when the RMB is pressed.  You will also need to check that the gameState is correct.  Something like the following.  As before, this goes inside a class, this is not the full script file:

    void Update ()
    {
      if (AC.KickStarter.stateHandler.gameState == AC.GameState.DialogOptions)
      {
        if (Input.GetMouseButtonDown (1))
        {
          AC.KickStarter.playerInput.activeConversation = null;
        }
      }
    }
  • Will this script have to go in a gameobject in every scene?

    Thanks
  • If you place it on the PersistentEngine prefab, it'll be in every 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.