Page 1 of 1

Changing scenes using dialogues

Posted: Sat Jul 09, 2016 2:11 pm
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

Re: Changing scenes using dialogues

Posted: Sat Jul 09, 2016 4:29 pm
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.

Re: Changing scenes using dialogues

Posted: Sat Jul 09, 2016 9:33 pm
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).