MissileAI

From Elite Wiki
Revision as of 23:05, 24 January 2006 by Arexack (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Will intercept it's target, detonates when in reach (25m) of target. Will harmlessly explode when (a) message 'ECM' is recieved, (b) gone beyond range of 30000.0m travelled, (c) Target is lost or destroyed.


Defined states:

  • GLOBAL: ->ATTACK_SHIP
  • ATTACK_SHIP: ->EXPLODE, ->DETONATE
  • DETONATE: becomeExplosion, dealDamageInRange (250.0m)
  • EXPLODE: becomeExplosion



{
   "ATTACK_SHIP" = {
       "DESIRED_RANGE_ACHIEVED" = ("setStateTo: DETONATE"); 
       ENTER = ("setDesiredRangeTo: 25.0", performIntercept); 
       EXIT = (); 
       "TARGET_DESTROYED" = ("setStateTo: EXPLODE"); 
       "TARGET_LOST" = ("setStateTo: EXPLODE"); 
       "ECM" = ("setStateTo: EXPLODE"); 
       "GONE_BEYOND_RANGE" = ("setStateTo: EXPLODE"); 
       UPDATE = ("setDesiredRangeTo: 30000.0", checkDistanceTravelled, "setDesiredRangeTo: 25.0", "pauseAI: 5.0");     }; 
   DETONATE = {
       ENTER = ("setDesiredRangeTo: 250.0", dealEnergyDamageWithinDesiredRange, becomeExplosion); 
       EXIT = (); 
       UPDATE = ();     }; 
   EXPLODE = {
       ENTER = (becomeExplosion); 
       EXIT = (); 
       UPDATE = ();     }; 
   GLOBAL = {
       ENTER = ("setSpeedFactorTo: 1.0", "setStateTo: ATTACK_SHIP"); 
       EXIT = (); 
       UPDATE = (); 
   }; 
}

BACK