CollectLootAI
From Elite Wiki
Revision as of 13:01, 2 January 2011 by Eric Walch (talk | contribs) (script example from Oolite -> scripting page)
A specialised jobAI. Just two states.
Upon starting, it will imdeately redirect to the second state LOOT Which will locate the loot and collect it. All other messages will result in exitAI.
{ GLOBAL = { ENTER = ("setStateTo: LOOT"); }; LOOT = { ENTER = (performCollect); ATTACKED = ("exitAIWithMessage: ATTACKED"); "COLLISION" = (exitAI); "CARGO_SCOOPED" = ("exitAIWithMessage: CARGO_SCOOPED"); "HOLD_FULL" = ("exitAIWithMessage: HOLD_FULL"); "INCOMING_MISSILE" = (fightOrFleeMissile, "exitAIWithMessage: INCOMING_MISSILE"); "TARGET_LOST" = (exitAI); }; }