1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, updateteamsmarkers">*/
/*%FSM<HEAD>*/
/*
item0[] = {"Init",0,250,66.542603,-131.405823,156.542603,-81.406097,0.000000,"Init"};
item1[] = {"Update_Markers",2,4346,-66.836029,-56.267544,23.163887,-6.267582,0.000000,"Update Markers"};
item2[] = {"End",1,250,-194.208939,14.422928,-104.208908,64.422928,0.000000,"End"};
item3[] = {"Loop",4,218,65.605347,-56.267605,155.605377,-6.267574,0.000000,"Loop"};
item4[] = {"Gameover",4,218,-192.871109,-57.148956,-102.871117,-7.148972,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,14,6316128,1,-395.307037,395.306915,79.046959,-351.956635,725,514,1};
window[] = {0,-1,-1,-1,-1,734,100,1360,100,1,743};
*//*%FSM</HEAD>*/
class FSM
{
fsmName = "updateteamsmarkers";
class States
{
/*%FSM<STATE "Init">*/
class Init
{
name = "Init";
init = /*%FSM<STATEINIT""">*/"_sideText = sideJoinedText;" \n
"_label = """";" \n
"" \n
"_count = 1;" \n
"{" \n
" _marker = Format[""%1AdvancedSquad%2Marker"",_sideText,_count];" \n
" createMarkerLocal [_marker,[0,0,0]];" \n
" _marker setMarkerTypeLocal ""b_inf"";" \n
" _marker setMarkerColorLocal ""ColorBlue"";" \n
" _marker setMarkerSizeLocal [1,1];" \n
" _count = _count +1;" \n
"} forEach clientTeams;" \n
"" \n
"_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "Loop">*/
class Loop
{
priority = 0.000000;
to="Update_Markers";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 1 && !gameOver"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Update_Markers">*/
class Update_Markers
{
name = "Update_Markers";
init = /*%FSM<STATEINIT""">*/"_count = 1;" \n
"{" \n
" if !(isNil '_x') then {" \n
" _markerType = ""b_inf"";" \n
" _marker = Format[""%1AdvancedSquad%2Marker"",_sideText,_count];" \n
" " \n
" if (alive (leader _x)) then {" \n
" _label = """";" \n
" if (isPlayer (leader _x)) then {_label = Format[""%1 [%2]"",name (leader _x),_count]} else {_label = Format[""AI [%1]"",_count]};" \n
" _marker setMarkerTextLocal _label;" \n
" _marker setMarkerPosLocal GetPos (leader _x);" \n
" } else {" \n
" _markerType = ""b_empty"";" \n
" };" \n
" " \n
" _marker setMarkerTypeLocal _markerType;" \n
" };" \n
" _count = _count + 1;" \n
"} forEach clientTeams;" \n
"" \n
"_lastUpdate = time;"/*%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_Markers";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 1 && !gameOver"/*%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>*/
};
initState="Init";
finalStates[] =
{
"End"
};
};
/*%FSM</COMPILE>*/
|