Guest User

Untitled

a guest
Aug 30th, 2015
45
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #pragma strict
  2.  
  3. var PathOptions : Transform[];
  4.  
  5. function Start(){
  6.  
  7. }
  8.  
  9. function OnTriggerEnter(other : Collider){
  10.     if (other.tag == "AI Car"){
  11.         other.transform.root.GetComponent(AICarScript).CurrentPathObj = Random.Range(0,PathOptions.length);
  12.         Debug.Log("Chose path " + other.transform.root.GetComponent(AICarScript).CurrentPathObj);
  13.     }
  14. }
RAW Paste Data