Difference between revisions of "CollectLootAI"
From Elite Wiki
m |
m (Just a typo) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
A specialised '''jobAI'''. Just two states. | A specialised '''jobAI'''. Just two states. | ||
− | Upon starting, it will | + | Upon starting, it will immediately redirect to the second state LOOT which will locate the loot and collect it. |
− | |||
All other messages will result in '''exitAI'''. | 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); | ||
+ | }; | ||
} | } | ||
'''[[AI|BACK]]''' | '''[[AI|BACK]]''' | ||
− | [[Category:Oolite]] | + | [[Category:Oolite scripting]] |
Latest revision as of 22:25, 21 May 2012
A specialised jobAI. Just two states.
Upon starting, it will immediately 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); }; }