Difference between revisions of "PoliceInterceptAI"
From Elite Wiki
Eric Walch (talk | contribs) (script example from Oolite -> scripting page) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
*'''DOCK_WITH_STATION:''' →ATTACK, →FLEE | *'''DOCK_WITH_STATION:''' →ATTACK, →FLEE | ||
− | Refers to: [[dockingAI]].plist, [[interceptAI.plist | + | Refers to: [[dockingAI]].plist, [[interceptAI]].plist |
Line 45: | Line 45: | ||
[[AI|BACK]] | [[AI|BACK]] | ||
+ | |||
+ | [[Category:Oolite scripting]] |
Latest revision as of 12:19, 2 January 2011
A shorter version of interceptAI.
Defined states:
- GLOBAL: turnLightsOn, →ATTACK_SHIP
- ATTACK_SHIP: →FLEE, →DOCK_WITH_STATION
- FLEE: →ATTACK_SHIP, →DOCK_WITH_STATION
- DOCK_WITH_STATION: →ATTACK, →FLEE
Refers to: dockingAI.plist, interceptAI.plist
{ "ATTACK_SHIP" = { "ENERGY_LOW" = ("setStateTo: FLEE"); ENTER = (performAttack); EXIT = (); "INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE"); "TARGET_DESTROYED" = ("setStateTo: DOCK_WITH_STATION"); "TARGET_LOST" = ("setStateTo: DOCK_WITH_STATION"); UPDATE = (); };
"DOCK_WITH_STATION" = { "ACCEPT_DISTRESS_CALL" = (setTargetToFoundTarget, "setAITo: interceptAI.plist"); ATTACKED = (switchLightsOn, setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP"); ENTER = (switchLightsOff, setTargetToStation, "setDesiredRangeTo: 5000.0", performIntercept); "DESIRED_RANGE_ACHIEVED" = ("setAITo: dockingAI.plist"); EXIT = (); "INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE"); UPDATE = (); };
FLEE = { "ENERGY_FULL" = ("setStateTo: ATTACK_SHIP"); "TARGET_LOST" = ("setStateTo: DOCK_WITH_STATION"); "TARGET_DESTROYED" = ("setStateTo: DOCK_WITH_STATION"); ENTER = (performFlee); EXIT = (); "INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE"); UPDATE = (); };
GLOBAL = { ENTER = (switchLightsOn, "setStateTo: ATTACK_SHIP"); EXIT = (); UPDATE = (); }; }