Difference between revisions of "EnteringTraderAI"
From Elite Wiki
Eric Walch (talk | contribs) (script example from Oolite -> scripting page) |
|||
| Line 1: | Line 1: | ||
The AI that entering 'trader-roles' entities get assigned, decides the route. | The AI that entering 'trader-roles' entities get assigned, decides the route. | ||
Simple 2 state affair. | Simple 2 state affair. | ||
| + | |||
{ | { | ||
| − | + | GLOBAL = | |
| − | + | { | |
| − | + | ENTER = (performIdle, "setStateTo: DECIDE_ROUTE"); | |
| − | + | }; | |
| − | + | ||
| − | + | "DECIDE_ROUTE" = | |
| − | + | { | |
| − | + | ENTER = ("rollD: 3"); | |
| − | + | "ROLL_1" = ("switchAITo: route1traderAI.plist"); | |
| − | + | "ROLL_2" = ("switchAITo: route1traderAI.plist"); | |
| − | + | "ROLL_3" = ("switchAITo: route2sunskimAI.plist"); | |
| − | + | }; | |
| + | } | ||
'''[[AI|BACK]]''' | '''[[AI|BACK]]''' | ||
| − | [[Category:Oolite]] | + | [[Category:Oolite scripting]] |
Latest revision as of 12:07, 2 January 2011
The AI that entering 'trader-roles' entities get assigned, decides the route. Simple 2 state affair.
{
GLOBAL =
{
ENTER = (performIdle, "setStateTo: DECIDE_ROUTE");
};
"DECIDE_ROUTE" =
{
ENTER = ("rollD: 3");
"ROLL_1" = ("switchAITo: route1traderAI.plist");
"ROLL_2" = ("switchAITo: route1traderAI.plist");
"ROLL_3" = ("switchAITo: route2sunskimAI.plist");
};
}