this script is for my enemy to iterate throu a array of waypoints once at the end i want him to start over what i have so far is working, kinda i can iterate throu the hole array once bu i am unable to start it over here is what i have`
function OnTriggerEnter(col : Collider){
if(col.tag == "waypoint" && !isTriggered ){
isTriggered = true;
ChangeWayPoint();
}
}
function ChangeWayPoint(){
if(waypoints != 11){
curWayPoint ++;
isTriggered= false;
print(curWayPoint);
}else{
curWayPoint = 0;
isTriggered= false;
}
}`
not sure how to reset the array.