Advertisement
Guest User

Problematic scripting

a guest
Aug 3rd, 2012
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Start () {
  2.     thoughtText.font.material.color.a = 0;
  3. }
  4.  
  5. var thoughtText : GUIText;
  6.  
  7. function OnTriggerEnter (other : Collider) {
  8.     if (other.gameObject.name == "Shed Thoughts"){
  9.         thoughtText.text = "Oh lord";
  10.         thoughtText.font.material.color.a += Time.deltaTime;
  11.         Debug.Log("Works better");
  12.     }
  13. }
  14.    
  15. function OnTriggerExit (other : Collider) {
  16.     thoughtText.text = "";
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement