Difference between revisions of "EnteringPirateAI"

From Elite Wiki
(Edited to match enteringPirateAI.plist in the SVN repository for v1.62)
(script example from Oolite -> scripting page)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
  {
 
  {
    GLOBAL = {ENTER = ("setStateTo: CHECK_HOLD"); EXIT = (); UPDATE = (); };  
+
GLOBAL =
    "CHECK_HOLD" = {
+
{
 +
ENTER = ("setStateTo: CHECK_HOLD");
 +
};
 +
 
 +
"CHECK_HOLD" =
 +
{
 
  ENTER = (checkForFullHold);
 
  ENTER = (checkForFullHold);
        "HOLD_FULL" = ("switchAITo: enteringTraderAI.plist");
+
"HOLD_FULL" = ("switchAITo: enteringTraderAI.plist");
EXIT = ();
+
        "HOLD_NOT_FULL" = ("switchAITo: pirateAI.plist");
 +
        "NO_CARGO_BAY" = ("switchAITo: pirateAI.plist");  
 
  UPDATE = ("setStateTo: STILL_HUNGRY");
 
  UPDATE = ("setStateTo: STILL_HUNGRY");
  };  
+
  };
    "STILL_HUNGRY" = {
+
 
  ENTER = ();
+
"STILL_HUNGRY" =
EXIT = ();
+
{
        "HOLD_FULL" = ("switchAITo: enteringTraderAI.plist");
+
  "HOLD_FULL" = ("switchAITo: enteringTraderAI.plist");
 
  UPDATE = ("switchAITo: pirateAI.plist");
 
  UPDATE = ("switchAITo: pirateAI.plist");
  };  
+
  };
 
  }
 
  }
  
 
'''[[AI|BACK]]'''
 
'''[[AI|BACK]]'''
 +
 +
[[Category:Oolite scripting]]

Latest revision as of 12: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