/*%FSM<COMPILE "D:\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, TAW_VD State Tracker">*/
/*%FSM<HEAD>*/
/*
item0[] = {"init",0,4346,-39.234997,-157.457230,50.765003,-107.457222,0.000000,"init"};
item1[] = {"true",8,218,-39.286701,-67.901810,50.713299,-17.901814,0.000000,"true"};
item2[] = {"I_am_a_loop__",2,250,-37.913574,2.551729,52.086441,52.551727,0.000000,"I am a loop.."};
item3[] = {"Dead_Player",4,218,-137.117889,56.721581,-47.117889,106.721581,0.000000,"Dead Player"};
item4[] = {"I_am_dead_Set_my",2,250,-215.837250,109.620483,-125.837227,159.620499,0.000000,"I am dead" \n "Set my corpse"};
item5[] = {"Alive_player",4,218,-215.185760,16.088562,-125.185867,66.088623,0.000000,"Alive player"};
item6[] = {"Re_add_my_action",2,250,-215.481354,-68.055023,-125.481308,-18.054995,0.000000,"Re-add my" \n "action please"};
item7[] = {"State_changed",4,218,107.007217,1.512135,197.007202,51.512016,0.000000,"State changed"};
item8[] = {"Update_me",2,250,107.804337,-67.884735,197.804352,-17.884773,0.000000,"Update me"};
link0[] = {0,1};
link1[] = {1,2};
link2[] = {2,3};
link3[] = {2,7};
link4[] = {3,4};
link5[] = {4,5};
link6[] = {5,6};
link7[] = {6,1};
link8[] = {7,8};
link9[] = {8,1};
globals[] = {0.000000,0,0,0,0,640,480,1,12,6316128,1,-604.631348,604.623535,286.974182,-497.663422,1404,911,1};
window[] = {2,-1,-1,-32000,-32000,785,25,1465,25,3,1422};
*//*%FSM</HEAD>*/
class FSM
{
  fsmName = "TAW_VD State Tracker";
  class States
  {
    /*%FSM<STATE "init">*/
    class init
    {
      name = "init";
      init = /*%FSM<STATEINIT""">*/"private [""_playerState"",""_corpse"",""_actionID"",""_droneState""];" \n
       "" \n
       "_playerState = vehicle player;" \n
       "_droneState = UAVControl (getConnectedUAV player) select 1;" \n
       "tawvd_addon_disable = true;" \n
       "" \n
       "if(isNil {profileNamespace getVariable ""tawvd_foot""}) then {" \n
       "	profileNamespace setVariable [""tawvd_foot"",viewDistance];" \n
       "	profileNamespace setVariable [""tawvd_car"",viewDistance];" \n
       "	profileNamespace setVariable [""tawvd_air"",viewDistance];" \n
       "	profileNamespace setVariable [""tawvd_drone"",viewDistance];" \n
       "	profileNamespace setVariable [""tawvd_object"",viewDistance];" \n
       "	saveProfileNamespace;" \n
       "};" \n
       "" \n
       "tawvd_foot = profileNamespace getVariable [""tawvd_foot"",viewDistance];" \n
       "tawvd_car = profileNamespace getVariable [""tawvd_car"",viewDistance];" \n
       "tawvd_air = profileNamespace getVariable [""tawvd_air"",viewDistance];" \n
       "tawvd_drone = profileNamespace getVariable [""tawvd_drone"",viewDistance];" \n
       "tawvd_object = profileNamespace getVariable [""tawvd_object"",viewDistance];" \n
       "" \n
       "tawvd_syncObject = true;" \n
       "_actionID = player addAction[""<t color='#FF0000'>Settings</t>"",TAWVD_fnc_openMenu,[],-99,false,false,"""",''];"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "true">*/
        class true
        {
          priority = 0.000000;
          to="I_am_a_loop__";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
    /*%FSM<STATE "I_am_a_loop__">*/
    class I_am_a_loop__
    {
      name = "I_am_a_loop__";
      init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "State_changed">*/
        class State_changed
        {
          priority = 0.000000;
          to="Update_me";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"(vehicle player != _playerState OR (UAVControl getConnectedUAV player select 1) != _droneState)"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
        /*%FSM<LINK "Dead_Player">*/
        class Dead_Player
        {
          priority = 0.000000;
          to="I_am_dead_Set_my";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"!alive player"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
    /*%FSM<STATE "I_am_dead_Set_my">*/
    class I_am_dead_Set_my
    {
      name = "I_am_dead_Set_my";
      init = /*%FSM<STATEINIT""">*/"_corpse = player;" \n
       "_corpse removeAction _actionID;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "Alive_player">*/
        class Alive_player
        {
          priority = 0.000000;
          to="Re_add_my_action";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"alive player"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
    /*%FSM<STATE "Re_add_my_action">*/
    class Re_add_my_action
    {
      name = "Re_add_my_action";
      init = /*%FSM<STATEINIT""">*/"_actionID = player addAction[""<t color='#FF0000'>Settings</t>"",TAWVD_fnc_openMenu,[],-99,false,false,"""",''];"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "true">*/
        class true
        {
          priority = 0.000000;
          to="I_am_a_loop__";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
    /*%FSM<STATE "Update_me">*/
    class Update_me
    {
      name = "Update_me";
      init = /*%FSM<STATEINIT""">*/"[] call TAWVD_fnc_updateViewDistance;" \n
       "_playerState = vehicle player;" \n
       "_droneState = UAVControl (getConnectedUAV player) select 1;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "true">*/
        class true
        {
          priority = 0.000000;
          to="I_am_a_loop__";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
  };
  initState="init";
  finalStates[] =
  {
  };
};
/*%FSM</COMPILE>*/