//This script assumes that you are using my blackboard architecture and you have 2 actors //that are drived from boids. A chicken boid that has a state machine and some steering //behaviors, a mack truck that has a state machine and some steering behaviors. //This scripting method assumes a certain level of autonomy by the characters and //gives simple instructions. Most of the control is given to the characters. //Director - Class that posts tasks to the world blackboard and monitors them for //completion. Can implement a time based director which can post tasks based on time and remove them based on time. Director director = new Director(worldBlackboard); //have chicken go to the road Task task = new SeekPoint(EastRoad_Waypoint); director.postTask(task, chicken); director.monitorTaskForCompletion(task);//Actor will remove a completed task. task = new ActivateState(chicken, "Look Around"); director.postTask(task,chicken); director.monitorTaskForCompletion(task);//Actor will remove a completed task. task = new SeekPoint(WestRoad_Waypoint); director.postTask(task,chicken); director.monitorTaskForCompletion(task);//Actor will remove a completed task. //Have the truck seek out and intercept the chicken (it will do it on the road or off) task = new Intercept(mackTruck, chicken); director.postTask(task,mackTruck); director.monitorTaskForCompletion(task);//Actor will remove a completed task. //The truck smushed the chicken. Honk horn in victory!! task = new ActivateState(mackTruck, "Honk Horn"); director.postTask(task,mackTruck); director.monitorTaskForCompletion(task);//Actor will remove a completed task. quit;