/*%FSM*/ /*%FSM*/ /* item0[] = {"start_FSM",0,250,-38.248894,-46.006317,51.751091,3.993679,0.000000,"start FSM"}; item1[] = {"true",8,218,-300.193542,278.044952,-210.193649,328.044891,0.000000,"true"}; item2[] = {"damage",4,218,-38.426994,40.879616,51.573006,90.879616,0.000000,"damage"}; item3[] = {"seek_time",3,250,-39.916992,123.383163,50.083008,173.383163,0.000000,"seek time"}; item4[] = {"alive",4,218,-198.664108,121.662170,-108.664108,171.662170,0.000000,"alive"}; item5[] = {"not_alive",4,218,111.524933,126.917603,201.524933,176.917603,0.000000,"not alive"}; item6[] = {"timer",2,250,123.719742,215.107788,213.719757,265.107788,0.000000,"timer"}; item7[] = {"alarm",2,250,-201.575012,214.615479,-111.574951,264.615448,0.000000,"alarm"}; item8[] = {"end_1",1,250,-191.205963,336.518036,-101.205917,386.518066,0.000000,"end 1"}; item9[] = {"end_2",1,250,109.972252,328.855499,199.972290,378.855499,0.000000,"end 2"}; item10[] = {"true",8,218,236.273804,269.909821,326.273804,319.909729,0.000000,"true"}; item11[] = {"wait",4,218,-40.047585,210.474655,49.952415,260.474670,0.000000,"wait"}; item12[] = {"prosto_tak",2,250,-44.081776,323.247314,45.918240,373.247314,0.000000,"prosto tak"}; item13[] = {"IF_FiRED",4,4314,-525.661987,99.868652,-415.765717,158.252625,1.000000,"IF FiRED"}; item14[] = {"addEventHandler",2,250,-403.757477,23.817230,-260.160767,78.689636,0.000000,"addEventHandler"}; item15[] = {"removeEventHandl",2,250,-342.726898,166.084839,-214.610626,237.404114,0.000000,"removeEventHandler"}; item16[] = {"true",8,218,-177.188599,33.894405,-87.188591,83.894402,0.000000,"true"}; link0[] = {0,2}; link1[] = {0,16}; link2[] = {1,8}; link3[] = {2,3}; link4[] = {3,11}; link5[] = {4,7}; link6[] = {5,6}; link7[] = {6,10}; link8[] = {7,1}; link9[] = {10,9}; link10[] = {11,12}; link11[] = {12,4}; link12[] = {12,5}; link13[] = {13,15}; link14[] = {14,13}; link15[] = {15,4}; link16[] = {16,14}; globals[] = {0.000000,0,0,0,0,640,480,1,32,6316128,1,-505.776672,222.629074,608.209290,-153.030838,843,881,1}; window[] = {2,-1,-1,-1,-1,762,25,1285,25,3,861}; *//*%FSM*/ class FSM { fsmName = "3"; class States { /*%FSM*/ class start_FSM { name = "start_FSM"; init = /*%FSM*/"_ptr = _this select 0;" \n "fired_i = false;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class true { priority = 0.000000; to="addEventHandler"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class damage { priority = 0.000000; to="seek_time"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(count (_ptr call BIS_fnc_enemyTargets) > 0) or (damage _ptr > 0);"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class seek_time { name = "seek_time"; init = /*%FSM*/"_wait = time;" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class wait { priority = 0.000000; to="prosto_tak"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"time > (_wait + 5);"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class timer { name = "timer"; init = /*%FSM*/"hint ""TIMER"";"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class true { priority = 0.000000; to="end_2"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class alarm { name = "alarm"; init = /*%FSM*/"hint ""alarm"";"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class true { priority = 0.000000; to="end_1"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/""/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class end_1 { name = "end_1"; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ /*%FSM*/ class end_2 { name = "end_2"; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ /*%FSM*/ class prosto_tak { name = "prosto_tak"; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class not_alive { priority = 0.000000; to="timer"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"!(alive _ptr);"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class alive { priority = 0.000000; to="alarm"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(alive _ptr);"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class addEventHandler { name = "addEventHandler"; init = /*%FSM*/"_fired = _ptr addEventHandler [ ""fired"", { " \n "if ((_this select 4) == ""B_65x39_caseless_green"") then {hint""fired_i=true"";fired_i=true;}; " \n "}];"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class IF_FiRED { priority = 1.000000; to="removeEventHandl"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"fired_i;"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class removeEventHandl { name = "removeEventHandl"; init = /*%FSM*/"_ptr removeEventHandler [""fired"", _fired];"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class alive { priority = 0.000000; to="alarm"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"(alive _ptr);"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ }; initState="start_FSM"; finalStates[] = { "end_1", "end_2", }; }; /*%FSM*/