- Home /
This question was
closed Jan 18, 2016 at 07:51 PM by
Victors for the following reason:
The question is answered, right answer was accepted
Need help with appearing text on the trigger
Good morning/afternoon/evening. Help me, please, with script: When player stands on the trigger, text appears on the screen, but firstly one part of text, after 10 seconds second part of the text, (first part disappears, and second appear) and disappears all text after 15 seconds. P.S. I apologize for my English
Comment
Best Answer
Answer by darthbator · Aug 14, 2012 at 08:10 AM
You're going to want to use coroutines for this. It'll be something like this
IEnumerator textStuff () {
//text_stuff
yield return new WaitForSeconds(10);
//other_text_stuff
yield return new WaitForSeconds(5);
//take_down_text_stuff
}
Then you'll want to call that with StartCoroutine(textStuff). (on a side note I am not sure if you can yield twice in a coroutine, you may need to nest a second coroutine to do that. Either way coroutines are the way to go when you need waits!)