Execute change scene script during conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
sch
Posts: 4
Joined: Fri Jul 02, 2021 3:57 pm

Execute change scene script during conversation

Post by sch »

Hello,

I would like to know how to make a script work during a conversation.

For example I have a script that change scene. And I would like the script to function when the player choose the answer.

Example :
NPC : Do you want to go there ?
Player ; Yes (Execute the script to change scene)
Player : No (Nothing)

Thank you :)
User avatar
Tony Li
Posts: 21987
Joined: Thu Jul 18, 2013 1:27 pm

Re: Execute change scene script during conversation

Post by Tony Li »

Hi,

You can use the LoadLevel() sequencer command in the dialogue entry node's Sequence field. If you're using the Dialogue System's save system, it will change scenes properly for use with the save system. Otherwise it will make a regular SceneManager.LoadScene() call.
sch
Posts: 4
Joined: Fri Jul 02, 2021 3:57 pm

Re: Execute change scene script during conversation

Post by sch »

Works good thanks !
User avatar
Tony Li
Posts: 21987
Joined: Thu Jul 18, 2013 1:27 pm

Re: Execute change scene script during conversation

Post by Tony Li »

Glad to help!
Post Reply