How to continue dialog automatically (without pressing buttons)?
That's it.
I'm doing a cutscene and I don't know what I have to do to make a Dialog that doesn't need the user pressing certain buttons to change between sentences.
Comment
Answer by blue_coder · Jan 05, 2020 at 03:25 AM
Use bool and Coroutines!
bool cutscene_isTrue;
int stepcutscene;
//code here
if(Input.GetKeyDown(KeyCode.R) && !cutscene_isTrue){
cutscene_istrue = true;
stepcutscene = 1;
}
if(stepcutscene == 1){
text = "bla" // i know that's wrong
StartCourotine(ToStep2());
}
// code here
IEnumerator ToStep2(){
yield return new WaitForSeconds(2);
stepcutscene = 2;
}
Maybe there's something writted wrong but yeah