/*%FSM*/ /*%FSM*/ /* item0[] = {"Init",0,250,69.011497,-125.277687,159.011566,-75.277672,0.000000,"Init"}; item1[] = {"Update_Empty_Veh",2,4346,67.881363,24.571560,157.881256,74.571510,0.000000,"Update" \n "Empty" \n "Vehicles"}; item2[] = {"End",1,250,-62.454956,96.990730,27.545134,146.990707,0.000000,"End"}; item3[] = {"Loop",4,218,68.212364,-51.053558,158.212402,-1.053517,0.000000,"Loop"}; item4[] = {"Gameover",4,218,-62.855103,24.549839,27.144907,74.549820,0.000000,"Gameover"}; link0[] = {0,3}; link1[] = {1,3}; link2[] = {1,4}; link3[] = {3,1}; link4[] = {4,2}; globals[] = {0.000000,0,0,0,0,640,480,1,19,6316128,1,-421.780701,421.779755,226.237854,-325.234192,748,514,1}; window[] = {0,-1,-1,-1,-1,837,154,1414,203,1,766}; *//*%FSM*/ class FSM { fsmName = "emptyvehiclescollector"; class States { /*%FSM*/ class Init { name = "Init"; init = /*%FSM*/"_lastUpdate = time;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Loop { priority = 0.000000; to="Update_Empty_Veh"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"time - _lastUpdate > 1 && !gameOver"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class Update_Empty_Veh { name = "Update_Empty_Veh"; init = /*%FSM*/"_vehicles = WF_Logic getVariable ""emptyVehicles"";" \n "{" \n " if !(_x in emptyQueu) then {" \n " _vehicles2 = WF_Logic getVariable ""emptyVehicles"";" \n " emptyQueu = emptyQueu + [_x];" \n " _x Spawn HandleEmptyVehicle;" \n " _reloaded = _vehicles2 - [_x] - [objNull];" \n " WF_Logic setVariable [""emptyVehicles"",_reloaded,true];" \n " };" \n "} forEach _vehicles;" \n "_lastUpdate = time;"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { /*%FSM*/ class Gameover { priority = 0.000000; to="End"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"gameOver"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ /*%FSM*/ class Loop { priority = 0.000000; to="Update_Empty_Veh"; precondition = /*%FSM*/""/*%FSM*/; condition=/*%FSM*/"time - _lastUpdate > 1 && !gameOver"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ }; }; /*%FSM*/ /*%FSM*/ class End { name = "End"; init = /*%FSM*/""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { }; }; /*%FSM*/ }; initState="Init"; finalStates[] = { "End" }; }; /*%FSM*/