Difference between revisions of "ScavengerAI"
From Elite Wiki
(referes to attack-ship=undefined.) |
Eric Walch (talk | contribs) (script example from Oolite -> scripting page) |
||
(One intermediate revision by one other user not shown) | |||
Line 60: | Line 60: | ||
[[AI|BACK]] | [[AI|BACK]] | ||
+ | |||
+ | [[Category:Oolite scripting]] |
Latest revision as of 12:16, 2 January 2011
Describes the behaviour of scavengers.
Defined states:
- GLOBAL: →LOOK_FOR_STUFF
- LOOK_FOR_STUFF: →COLLECT_STUFF, →DOCK_WITH_STATION, →FLEE
- DOCK_WITH_STATION: →ATTACK_SHIP, →FLEE
- COLLECT_STUFF: →LOOK_FOR_STUFF, →DOCK_WITH_STATION, →FLEE
- ATTACK_SHIP: refered to, but undefined.
- FLEE: →LOOK_FOR_STUFF, →FLEE
Referes to AI's: dockingAI.plist
{ "LOOK_FOR_STUFF" = { ATTACKED = (setTargetToPrimaryAggressor, broadcastDistressMessage, "setStateTo: FLEE"); ENTER = (performIdle); EXIT = (); "HOLD_FULL" = ("setStateTo: DOCK_WITH_STATION"); "INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE"); "TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: COLLECT_STUFF"); "NOTHING_FOUND" = ("setStateTo: DOCK_WITH_STATION"); UPDATE = (scanForRandomLoot, "pauseAI: 10.0"); };
"DOCK_WITH_STATION" = { ATTACKED = (setTargetToPrimaryAggressor, broadcastDistressMessage, "setStateTo: ATTACK_SHIP"); ENTER = (setTargetToStation, "setDesiredRangeTo: 5000.0", performIntercept); "DESIRED_RANGE_ACHIEVED" = ("setAITo: dockingAI.plist"); EXIT = (); "INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE"); UPDATE = (); };
FLEE = { "ENERGY_FULL" = (performIdle, "setStateTo: LOOK_FOR_STUFF"); "TARGET_LOST" = (performIdle, "setStateTo: LOOK_FOR_STUFF"); ENTER = ("setDesiredRangeTo: 25600", performFlee); EXIT = (); "INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE"); "REACHED_SAFETY" = ("setSpeedTo: 0.0", performIdle); UPDATE = (); };
GLOBAL = { ENTER = ("setSpeedFactorTo: 1.0", "setStateTo: LOOK_FOR_STUFF"); EXIT = (); UPDATE = (); };
"COLLECT_STUFF" = { ATTACKED = (setTargetToPrimaryAggressor, broadcastDistressMessage, "setStateTo: FLEE"); "CARGO_SCOOPED" = (checkForFullHold, "setStateTo: LOOK_FOR_STUFF"); FRUSTRATED = ("setStateTo: LOOK_FOR_STUFF"); "TARGET_LOST" = ("setStateTo: LOOK_FOR_STUFF"); "COLLISION" = ("setStateTo: LOOK_FOR_STUFF"); ENTER = (performCollect); EXIT = (); "HOLD_FULL" = ("setStateTo: DOCK_WITH_STATION"); "INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE"); UPDATE = (); }; }