home *** CD-ROM | disk | FTP | other *** search
-
- //*********************************************************************************
-
- fsm GENERIC : integer;
-
- //------------------------------------------------------------------
- //
- // Constant Definitions
- //
- //------------------------------------------------------------------
- const
-
- #include_ <content\ABLScripts\mwconst.abi>
- //------------------------------------------------------------------
- //
- // Type Definitions
- //
- //------------------------------------------------------------------
- type
-
- #include_ <content\ABLScripts\mwtype.abi>
-
- //------------------------------------------------------------------
- //
- // Variable Declarations
- //
- //------------------------------------------------------------------
- var
-
- eternal integer playermech;
-
-
- static integer cinema_cut;
-
- //------------------------------------------------------------------
- //
- // Init Function (automatically run first time through)
- //
- //------------------------------------------------------------------
-
- function init;
- var
- integer i;
-
- code
-
- playermech = getplayervehicle(epl_player0);
-
- GroupAddObject(GroupObjectId(1),playermech);
-
-
- //GroupAddObject(GroupObjectId(X),eve_SOMETHING);
-
- //SetGroupAI(groupobjectid(X),GROUPAI_MOODSQUAD);
-
-
- cinema_cut = 0;
-
- endfunction;
-
- //------------------------------------------------------------------
- //
- // Main Code
- //
- //------------------------------------------------------------------
- state startState;
-
- code
- //playsound(eso_start);
- //setactivationdistance(6800);
- //trans opening;
- trans sit;
-
- endstate;
-
-
- state deadState;
- code
- endstate;
-
- //------------------------------------------------------------------
- //
- // Sit state : description
- //
- //------------------------------------------------------------------
- state sit;
-
- code
-
-
- //Reveal the objectives
-
- //Fail the mission when the player dies
- if (isdead(playermech)) then
- failobjectiveall(9);
- endif;
-
-
- endstate;
-
- //-----------------------------------------
- //HERE THERE BE CINEMAS
- //-----------------------------------------
-
- state opening;
-
- code
-
- switch (cinema_cut)
-
- case 0:
-
- endcase;
-
- case 1:
-
- endcase;
-
- case 2:
-
- endcase;
-
- case 3:
-
- endcase;
-
- endswitch;
-
-
-
- endstate;
-
- state won;
-
- code
-
- switch cinema_cut
-
- case 0:
-
- endcase;
-
- case 1:
-
- endcase;
-
- endswitch;
-
- endstate;
-
- state lost;
-
- code
-
- switch cinema_cut
-
- case 0:
-
- endcase;
-
- case 1:
-
- endcase;
-
- endswitch;
-
- endstate;
-
-
- endfsm.
- //******************************************************************
-
-