Oolite Bulletins

For information and discussion about Oolite.
It is currently Sun Jun 25, 2017 3:42 pm

All times are UTC




Post new topic  Reply to topic  [ 1 post ] 
Author Message
 Post subject: Basic station AI
PostPosted: Sun Aug 07, 2016 9:46 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Wed Aug 15, 2012 4:19 am
Posts: 2401
Location: Finland
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:
Code:
this.aiStarted = function() {
...
	ai.setParameter("oolite_stationPatrolRole","tescoosecurity");
	ai.setPriorities([
...
		/* Patrol */
		{
			preconfiguration: ai.configurationCheckScanner,
			notcondition: ai.conditionScannerContainsPatrol,
			behaviour: ai.behaviourStationLaunchPatrol,
			reconsider: 60
		},
...
	]);
}
So logically after setting 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 :D .


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: CmdrGumbo, Yahoo [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited