Difference between revisions of "EnteringPirateAI"

From Elite Wiki
m (updated Giles' correction)
(script example from Oolite -> scripting page)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{
 
{
GLOBAL = {
+
GLOBAL =
ENTER = ("setStateTo: CHECK_HOLD");
+
{
EXIT = ();
+
ENTER = ("setStateTo: CHECK_HOLD");
UPDATE = (); };
+
};
:
+
"CHECK_HOLD" = {
+
"CHECK_HOLD" =
ENTER = (checkForFullHold);
+
{
"HOLD_FULL" = ("switchAITo: enteringTraderAI.plist");
+
ENTER = (checkForFullHold);
EXIT = ();
+
"HOLD_FULL" = ("switchAITo: enteringTraderAI.plist");
UPDATE = ("switchStateTo: STILL_HUNGRY"); };
+
"HOLD_NOT_FULL" = ("switchAITo: pirateAI.plist");
:
+
"NO_CARGO_BAY" = ("switchAITo: pirateAI.plist");
"STILL_HUNGRY" = {
+
UPDATE = ("setStateTo: STILL_HUNGRY");
ENTER = ();
+
};
EXIT = ();
+
UPDATE = ("switchAITo: pirateAI.plist"); }; }
+
"STILL_HUNGRY" =
  +
{
  +
"HOLD_FULL" = ("switchAITo: enteringTraderAI.plist");
  +
UPDATE = ("switchAITo: pirateAI.plist");
  +
};
  +
}
   
 
'''[[AI|BACK]]'''
 
'''[[AI|BACK]]'''
  +
  +
[[Category:Oolite scripting]]

Latest revision as of 13:06, 2 January 2011

{
	GLOBAL =
	{
		ENTER = ("setStateTo: CHECK_HOLD");
	};
	"CHECK_HOLD" =
	{
		ENTER = (checkForFullHold);
		"HOLD_FULL" = ("switchAITo: enteringTraderAI.plist");
        	"HOLD_NOT_FULL" = ("switchAITo: pirateAI.plist"); 
        	"NO_CARGO_BAY" = ("switchAITo: pirateAI.plist"); 
		UPDATE = ("setStateTo: STILL_HUNGRY");
	};
	"STILL_HUNGRY" =
	{
		"HOLD_FULL" = ("switchAITo: enteringTraderAI.plist");
		UPDATE = ("switchAITo: pirateAI.plist");
	};
}

BACK