Hello,
First of all sorry if it has already been asked but I've been searching and wasn't able to find any answer I can understand with my limited skills.
I'm trying to load a scene at the end a conversation.
There's the OnConversationEnd(Transform actor) but when I write an application.loadlevel here nothing happens.
Is it the right place to do it? Is it possible within the editor?
Anyway thank you!
LoadLevel at the end of a conversation
Re: LoadLevel at the end of a conversation
Hi!
The easiest way is to use the LoadLevel() sequencer command.
When you're writing your conversation, set the Sequence field of the last dialogue entry node to something like:
Finally, if you want to use your own script, it must be on the Dialogue Manager or one of the conversation participants. It's usually better to use the LoadLevel() sequencer command rather than Application.LoadLevel() because it will coordinate with the Level Manager component if you've added one to your Dialogue Manager. (The Level Manager component takes care of saving and loading persistent data as you move between levels.)
The easiest way is to use the LoadLevel() sequencer command.
When you're writing your conversation, set the Sequence field of the last dialogue entry node to something like:
- Dialogue Text: "Let's go to the movies!"
- Sequence: LoadLevel(MovieTheater)
Finally, if you want to use your own script, it must be on the Dialogue Manager or one of the conversation participants. It's usually better to use the LoadLevel() sequencer command rather than Application.LoadLevel() because it will coordinate with the Level Manager component if you've added one to your Dialogue Manager. (The Level Manager component takes care of saving and loading persistent data as you move between levels.)
Re: LoadLevel at the end of a conversation
It works! Thanks a lot.
The subtitle doesn't load though, as the scene load when the answer button is pressed. Is there something simple to wait a few seconds before loading the scene?
Anyway thanks again!
The subtitle doesn't load though, as the scene load when the answer button is pressed. Is there something simple to wait a few seconds before loading the scene?
Anyway thanks again!
Re: LoadLevel at the end of a conversation
Yup, try this sequence:
This tells the LoadLevel() command to wait for a duration based on the length of the subtitle text.
Code: Select all
LoadLevel(MovieTheater)@{{end}}
Re: LoadLevel at the end of a conversation
Thanks a lot! (Again)
It works perfectly and I now know how to use sequences! +1 skill point.
It works perfectly and I now know how to use sequences! +1 skill point.
Re: LoadLevel at the end of a conversation
Awesome! Happy to help!