Changing scenes using dialogues

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
joshcunn
Posts: 3
Joined: Sat Jul 09, 2016 2:06 pm

Changing scenes using dialogues

Post by joshcunn »

I am making a game where the story changes based on the which way you choose to take the conversation. Basically if you say one thing that would lead to one scene, but if you choose to say the other thing that takes you to a different scene. Is that possible/ does anyone know how to do that?

Thanks
User avatar
supadupa64
Posts: 200
Joined: Sun Mar 06, 2016 9:40 pm
Contact:

Re: Changing scenes using dialogues

Post by supadupa64 »

Tony will have the master solution, but if I had to take a crack at it you would start by using the sequence command in the conversation.

In the player response under Sequence you would put the appropriate command for loading the new scene or whatever you want to have happen when the player selects a response.
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Changing scenes using dialogues

Post by Tony Li »

Yup, that's the way to do it. Use the LoadLevel() sequencer command in the Sequence fields of the player's response nodes. For example:
  • Taxi Driver: "Where to, buddy?"
    • Player: "Rockefeller Center"
      Sequence: LoadLevel(Rockefeller)
      • Taxi Driver: "Here you are, 45 Rockefeller."
    • Player: "JFK Airport"
      Sequence: LoadLevel(Airport)
      • Taxi Driver: "Just pulling into the airport now, chief."
The example above assumes:
  • You've added scenes named "Rockefeller" and "Airport" to your build settings, and
  • The Dialogue Manager's Don't Destroy On Load and Allow Only One Instance checkboxes are ticked (which is the default).
Post Reply