Basic station AI
Posted: Sun Aug 07, 2016 9:46 am
I'm messing with YAH stations' AI and would really, really much appreciate a basic station js AI that, on top of doing the basic defense and traffic control, would have it's own defense ship patrolling the station. Basically I would like to write something like this:
So logically after setting
I'm not sure what
Hope that makes some sense
.
Code: Select all
this.aiStarted = function() {
...
ai.setParameter("oolite_stationPatrolRole","tescoosecurity");
ai.setPriorities([
...
/* Patrol */
{
preconfiguration: ai.configurationCheckScanner,
notcondition: ai.conditionScannerContainsPatrol,
behaviour: ai.behaviourStationLaunchPatrol,
reconsider: 60
},
...
]);
}
ai.setParameter("oolite_stationPatrolRole","tescoosecurity");, ai.conditionScannerContainsPatrol would check for "tescoosecurity" and ai.behaviourStationLaunchPatrol would launch "tescoosecurity" that would keep patrolling the station perimeter.I'm not sure what
ai.setParameter("oolite_stationPatrolRole","tescoosecurity"); and ai.conditionScannerContainsPatrol exactly achieve, but ai.behaviourStationLaunchPatrol always launches police ships.Hope that makes some sense