/*%FSM*/ /*%FSM*/ /* item0[] = {"chicken",0,4346,-306.490601,-197.039688,-216.490692,-147.039795,0.000000,"chicken"}; item1[] = {"_",8,218,62.332706,-185.990021,114.284866,-157.584717,0.000000,""}; item2[] = {"decision",2,250,165.295456,-196.723892,255.295410,-146.723892,0.000000,"decision"}; item3[] = {"decision_made",4,218,165.267090,-53.833382,255.267029,-3.833395,100.000000,"decision made"}; item4[] = {"action",2,250,45.978439,130.034073,135.978394,180.034134,0.000000,"action"}; item5[] = {"actioned",4,218,-165.144226,130.039581,-75.144043,180.039612,100.000000,"actioned"}; item6[] = {"dispose",4,218,307.945099,-276.114319,397.945160,-226.114349,90.000000,"dispose"}; item7[] = {"_",8,218,64.556526,282.467346,116.508621,310.872589,0.000000,""}; item8[] = {"reset_vars",2,250,-57.248745,-196.860123,32.751255,-146.860138,0.000000,"reset vars"}; item9[] = {"_",8,218,-152.435730,-185.989990,-100.483566,-157.584686,0.000000,""}; item10[] = {"met",4,218,-166.567764,-125.494614,-76.567673,-75.494598,10.000000,"met"}; item11[] = {"_",8,218,64.124817,-17.502594,116.076874,10.902637,5.000000,""}; item12[] = {"end",1,250,376.909119,265.283997,466.909119,315.283997,0.000000,"end"}; item13[] = {"_",8,218,395.047943,158.480392,447.000031,186.885605,0.000000,""}; item14[] = {"dispose",4,218,206.606644,27.804543,296.606628,77.804550,80.000000,"dispose"}; item15[] = {"dispose",2,250,377.031403,29.348614,467.031403,79.348602,0.000000,"dispose"}; item16[] = {"criteria",2,250,-166.153702,-28.650204,-76.153595,21.349773,0.000000,"criteria"}; item17[] = {"lay",4,218,338.653534,-196.376328,428.653534,-146.376312,50.000000,"lay"}; item18[] = {"lay_egg",4,218,209.462189,129.238632,299.462189,179.238632,60.000000,"lay egg"}; item19[] = {"lay_egg",2,250,210.780411,271.612823,300.780365,321.612823,0.000000,"lay egg"}; item20[] = {"no_decision",4,218,165.958954,-303.156921,255.958939,-253.156921,5.000000,"no decision"}; item21[] = {"update",2,250,44.677261,-304.475220,134.677246,-254.475189,0.000000,"update"}; link0[] = {0,9}; link1[] = {1,2}; link2[] = {2,3}; link3[] = {2,6}; link4[] = {2,17}; link5[] = {2,20}; link6[] = {3,4}; link7[] = {4,5}; link8[] = {4,14}; link9[] = {4,18}; link10[] = {5,16}; link11[] = {6,2}; link12[] = {7,4}; link13[] = {8,1}; link14[] = {9,8}; link15[] = {10,8}; link16[] = {11,4}; link17[] = {13,12}; link18[] = {14,15}; link19[] = {15,13}; link20[] = {16,10}; link21[] = {16,11}; link22[] = {17,2}; link23[] = {18,19}; link24[] = {19,7}; link25[] = {20,21}; link26[] = {21,1}; globals[] = {0.000000,0,0,0,16777215,640,480,1,82,6316128,1,-391.494690,743.543762,448.214935,-340.116058,861,598,1}; window[] = {2,-1,-1,-1,-1,603,78,1103,78,3,879}; *//*%FSM*/ class FSM { fsmName = "chicken"; class States { /*%FSM*/ class chicken { name = "chicken"; init = /*%FSM*/"_animal = _this select 0;" \n "_plyr = player;" \n "_dispDist = 550;" \n "" \n "_eggTime = 45;" \n "_eggCheck = diag_tickTime;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="reset_vars"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class decision { name = "decision"; init = /*%FSM*/"_plyrDist = _animal distance _plyr;" \n "_animalPos = getPos _animal;" \n "" \n "" \n "" \n "" \n "" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class decision_made { priority = 100.000000; to="action"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_decisionMade;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class dispose { priority = 90.000000; to="decision"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_plyrDist > _dispDist || !(alive _animal);"/*%FSM*/; action=/*%FSM*/"_doDispose = true;" \n "_decisionMade = true;"/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class lay { priority = 50.000000; to="decision"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"diag_tickTime > (_eggCheck + (_eggTime * 60)) ;"/*%FSM*/; action=/*%FSM*/"_doEgg = true;" \n "_decisionMade = true;" \n ""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class no_decision { priority = 5.000000; to="update"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"!_decisionMade;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class action { name = "action"; init = /*%FSM*/"//intentionally left blank"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class actioned { priority = 100.000000; to="criteria"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_actionDone;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class dispose { priority = 80.000000; to="dispose"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_doDispose;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class lay_egg { priority = 60.000000; to="lay_egg"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"_doEgg;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class reset_vars { name = "reset_vars"; init = /*%FSM*/"//Routine" \n "_actionDone = false;" \n "_decisionMade = false;" \n "_sWait = 0;" \n "_doDispose = false;" \n "_criteria = Nil;" \n "_criteriaMet = false;" \n "_t = diag_tickTime;" \n "" \n "//Decision" \n "_animalPos=[0,0,0];" \n "" \n "//Special" \n "_doEgg = false;" \n "_posWH = [];" \n "_egg = objNull;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="decision"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class end { name = "end"; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ /*%FSM*/ class dispose { name = "dispose"; init = /*%FSM*/"_animal spawn {" \n " uiSleep 60;" \n " deleteVehicle _this;" \n "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="end"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class criteria { name = "criteria"; init = /*%FSM*/"//intentionally left blank"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class met { priority = 10.000000; to="reset_vars"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(call compile _criteria) || (diag_tickTime > (_t + _sWait));"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class _ { priority = 5.000000; to="action"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class lay_egg { name = "lay_egg"; init = /*%FSM*/"_posWH = getPos _animal;" \n "_egg = createVehicle[""groundWeaponHolder"", _posWH, [], 0, ""CAN_COLLIDE""];" \n "_egg setPosATL _posWH;" \n "_egg addMagazineCargoGlobal[""PartOreGold"", 1];" \n "_eggCheck = diag_tickTime;" \n "" \n "_sWait = 3;" \n "_actionDone = true;" \n "_t = diag_tickTime;" \n "_criteria = format [""%1"", false ];"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="action"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class update { name = "update"; init = /*%FSM*/"//intentionally left blank"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class _ { priority = 0.000000; to="decision"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ }; initState="chicken"; finalStates[] = { "end" }; }; /*%FSM*/