Guest User

Untitled

a guest
Jan 23rd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. function GetWaypoints () {
  3.     // Now, this function basically takes the container object for the waypoints, then finds all of the transforms in it,
  4.     // once it has the transforms, it checks to make sure it's not the container, and adds them to the array of waypoints.
  5.     var potentialWaypoints : Array = waypointContainer.GetComponentsInChildren( Transform );
  6.     waypoints = new Array();
  7.    
  8.     for ( var potentialWaypoint : Transform in potentialWaypoints ) {
  9.         if ( potentialWaypoint != waypointContainer.transform ) {
  10.             waypoints[ waypoints.length ] = potentialWaypoint;
  11.         }
  12.     }
  13. }
Add Comment
Please, Sign In to add comment