summaryrefslogtreecommitdiffstats
path: root/Server/FSM/basearea.fsm
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-06-11 19:53:22 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-06-11 19:53:22 +0300
commitc055d44dcdb87e8db49fb23e632fc086aa44cce6 (patch)
tree7ac98d865915930bebc86b36b512a859c31538e5 /Server/FSM/basearea.fsm
downloada2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.tar.gz
a2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.tar.bz2
a2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.zip
init
Diffstat (limited to '')
-rw-r--r--Server/FSM/basearea.fsm141
1 files changed, 141 insertions, 0 deletions
diff --git a/Server/FSM/basearea.fsm b/Server/FSM/basearea.fsm
new file mode 100644
index 0000000..177e28d
--- /dev/null
+++ b/Server/FSM/basearea.fsm
@@ -0,0 +1,141 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, basearea">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,-81.542984,-257.577942,8.457038,-207.578140,0.000000,"Init"};
+item1[] = {"End",1,250,-216.387955,-52.508366,-126.387947,-2.508394,0.000000,"End"};
+item2[] = {"Update_Areas",2,4346,-82.090652,-139.314026,7.909359,-89.314034,0.000000,"Update Areas"};
+item3[] = {"Loop",4,218,53.846153,-139.681244,143.846161,-89.681236,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-216.387955,-139.464890,-126.387947,-89.464890,0.000000,"Gameover"};
+item5[] = {"_",8,218,-51.736092,-184.192123,-21.083296,-163.272247,0.000000,""};
+link0[] = {0,5};
+link1[] = {2,3};
+link2[] = {2,4};
+link3[] = {3,2};
+link4[] = {4,1};
+link5[] = {5,2};
+globals[] = {0.000000,0,0,0,0,640,480,1,8,6316128,1,-450.330200,450.329834,163.072220,-391.043060,721,617,1};
+window[] = {0,-1,-1,-1,-1,792,265,1678,55,1,739};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "basearea";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_brr = 'WFBE_BASEAREARANGE' Call GetNamespace;" \n
+ "_mbr = 'WFBE_MHQBUILDINGRANGE' Call GetNamespace;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Update_Areas";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Areas">*/
+ class Update_Areas
+ {
+ name = "Update_Areas";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;" \n
+ "_areaWest = WF_Logic getVariable 'WestArea';" \n
+ "_areaEast = WF_Logic getVariable 'EastArea';" \n
+ "" \n
+ "_buildingsWest = WestBaseStructures + [WestMHQ];" \n
+ "_buildingsEast = EastBaseStructures + [EastMHQ];" \n
+ "" \n
+ "_newWest = _areaWest;" \n
+ "_newEast = _areaEast;" \n
+ "" \n
+ "{" \n
+ " _logic = _x;" \n
+ " _structures = [_logic,_buildingsWest] Call SortByDistance;" \n
+ " _update = false;" \n
+ " if (count _structures > 0) then {" \n
+ " if ((_structures select 0) distance _logic > (_brr + _mbr)) then {_update = true};" \n
+ " if (_update) then {" \n
+ " _newWest = _newWest - [_logic] - [objNull];" \n
+ " _grp = group _logic;" \n
+ " deleteVehicle _logic;" \n
+ " deleteGroup _grp;" \n
+ " };" \n
+ " };" \n
+ "} forEach _areaWest;" \n
+ "" \n
+ "if (count _newWest != count _areaWest) then {" \n
+ " WF_Logic setVariable ['WestArea',_newWest,true];" \n
+ "};" \n
+ "" \n
+ "{" \n
+ " _logic = _x;" \n
+ " _structures = [_logic,_buildingsEast] Call SortByDistance;" \n
+ " _update = false;" \n
+ " if (count _structures > 0) then {" \n
+ " if ((_structures select 0) distance _logic > (_brr + _mbr)) then {_update = true};" \n
+ " if (_update) then {" \n
+ " _newEast = _newEast - [_logic] - [objNull];" \n
+ " _grp = group _logic;" \n
+ " deleteVehicle _logic;" \n
+ " deleteGroup _grp;" \n
+ " };" \n
+ " };" \n
+ "} forEach _areaEast;" \n
+ "" \n
+ "if (count _newEast != count _areaEast) then {" \n
+ " WF_Logic setVariable ['EastArea',_newEast,true];" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Areas";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _lastUpdate > 30"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file