/*%FSM*/ /*%FSM*/ /* item0[] = {"Begin_State",0,4346,27.230743,932.382141,117.230728,982.382141,0.000000,"Begin State"}; item1[] = {"True",8,218,25.000000,850.000000,125.000000,900.000000,0.000000,"True"}; item2[] = {"Base_Rotation",2,250,25.000000,750.000000,125.000000,800.000000,0.000000,"Base Rotation"}; item3[] = {"Wait",4,218,150.000000,725.000000,250.000000,775.000000,0.000000,"Wait"}; item4[] = {"Driver_Check",4,218,25.000000,675.000000,125.000000,725.000000,1.000000,"Driver Check"}; item5[] = {"Disabled",4,218,125.000000,825.000000,225.000000,875.000000,101.000000,"Disabled"}; item6[] = {"Waiting",2,250,225.000000,850.000000,325.000000,900.000000,0.000000,"Waiting"}; item7[] = {"Wait",4,218,225.000000,925.000000,325.000000,975.000000,0.000000,"Wait"}; item8[] = {"Enabled",4,218,300.000000,800.000000,400.000000,850.000000,100.000000,"Enabled"}; link0[] = {0,1}; link1[] = {1,2}; link2[] = {2,3}; link3[] = {2,4}; link4[] = {2,5}; link5[] = {3,2}; link6[] = {4,2}; link7[] = {5,6}; link8[] = {6,7}; link9[] = {6,8}; link10[] = {7,6}; link11[] = {8,2}; globals[] = {0.000000,0,0,0,0,640,480,2,315,6316128,1,-218.693237,496.393402,1020.462097,570.664734,779,490,1}; window[] = {0,-1,-1,-1,-1,766,104,1501,104,1,797}; *//*%FSM*/ class FSM { fsmName = "AIDRIVEBEHAVIOR"; class States { /*%FSM*/ class Begin_State { name = "Begin_State"; itemno = 0; init = /*%FSM*/"VCM_DrivingDelay = 1;" \n "VCM_DrivingDist = 20;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class True { itemno = 1; priority = 0.000000; to="Base_Rotation"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Base_Rotation { name = "Base_Rotation"; itemno = 2; init = /*%FSM*/"//We want to set all the important variables here." \n "//We want to filter through all the vehicles in the map, and check which ones have drivers." \n "//This is a better method than filtering through every units, typically there are less vehicles than AI." \n "_t = time;" \n "private _DriverArray = ([] call VCM_fnc_UpdateDrivers);" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Disabled { itemno = 5; priority = 101.000000; to="Waiting"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"!Vcm_DrivingActivated"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Driver_Check { itemno = 4; priority = 1.000000; to="Base_Rotation"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"count _DriverArray > 0 && {time > _t + VCM_DrivingDelay}"/*%FSM*/; action=/*%FSM*/"_DriverArray call VCM_fnc_VehicleDetection"/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Wait { itemno = 3; priority = 0.000000; to="Base_Rotation"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"time > _t + VCM_DrivingDelay"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Waiting { name = "Waiting"; itemno = 6; init = /*%FSM*/"_t = time;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Enabled { itemno = 8; priority = 100.000000; to="Base_Rotation"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"Vcm_DrivingActivated"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Wait { itemno = 7; priority = 0.000000; to="Waiting"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"time > _t + 10"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ }; initState="Begin_State"; finalStates[] = { }; }; /*%FSM*/