Quantcast
Channel: Latest Questions by TheGeekyDead
Viewing all articles
Browse latest Browse all 22

Text [BOX]/[GUIText] loads wrong, and no fade text in/out?

$
0
0
I'm having trouble making a Story Text, that the user can read as it fades in and out, as part one fades out it enables part 2, so on. I can make the text appear on the screen with the "GUI.Text" Disables and the script on a blank object turns it on/off. But it's only 1 line not fading in/out like i need. Part 2 loads up but same issue never fades and after it's deleted it never vanishes.. And /n don't seem to line break the gui.text object. I could use a little help here, i know you all are busy but im stuck on this, i need it to look half way decent so it don't ruin the atmosphere. var TextOne : GameObject; var TextTwo : GameObject; function Start(){ TextOne.SetActive (true); guiText.material.color.a = 0; yield WaitForSeconds(0.5); FadeIn(); } function FadeIn(){ while (guiText.material.color.a < 2){ guiText.material.color.a += 0.1 * Time.deltaTime * 3; yield; } yield WaitForSeconds(0.5); FadeOut(); TextOne.SetActive (false); TextTwo.SetActive (true); } function FadeOut(){ while (guiText.material.color.a > 0){ guiText.material.color.a -= 0.1 * Time.deltaTime * 3; yield; } Destroy (gameObject); } Well i realized i had to place the script on an actual GUI.Text before it would fade lol, but it still work load part 2 text.

Viewing all articles
Browse latest Browse all 22

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>