This commit is contained in:
vbawol
2013-02-01 01:47:36 -06:00
parent d69e34617a
commit c4fa47f4d9
18 changed files with 570 additions and 202 deletions

View File

@@ -6,7 +6,7 @@ item1[] = {"End",1,250,50.000000,-250.000000,150.000000,-200.000000,0.000000,"En
item2[] = {"Not_Alive",4,218,0.000000,300.000000,100.000000,350.000000,5.000000,"Not" \n "Alive"};
item3[] = {"Nobody_Near",4,218,0.000000,375.000000,100.000000,425.000000,4.000000,"Nobody" \n "Near"};
item4[] = {"loiter",4,218,-300.000000,0.000000,-200.000000,50.000000,0.000000,"loiter"};
item5[] = {"Loiter",2,250,-300.000000,75.000000,-200.000000,125.000000,0.000000,"Loiter"};
item5[] = {"Loiter",2,4346,-300.000000,75.000000,-200.000000,125.000000,0.000000,"Loiter"};
item6[] = {"In_Position",4,218,-175.000000,75.000000,-75.000000,125.000000,1.000000,"In Position"};
item7[] = {"",7,210,-29.000042,321.000000,-20.999958,329.000000,0.000000,""};
item8[] = {"",7,210,-29.000042,395.999939,-20.999958,404.000061,0.000000,""};
@@ -15,7 +15,7 @@ item10[] = {"Begin",2,250,-300.000000,-100.000000,-200.000000,-50.000000,0.00000
item11[] = {"",7,210,-254.000046,-29.000004,-245.999954,-20.999996,0.000000,""};
item12[] = {"",7,210,-204.000046,146.000000,-195.999954,154.000000,0.000000,""};
item13[] = {"Has_Target",4,218,-150.000000,225.000000,-50.000000,275.000000,1.000000,"Has" \n "Target"};
item14[] = {"Chase",2,4346,-150.000000,300.000000,-50.000000,350.000000,0.000000,"Chase"};
item14[] = {"Chase",2,250,-150.000000,300.000000,-50.000000,350.000000,0.000000,"Chase"};
item15[] = {"",7,210,-29.000006,146.000000,-20.999996,154.000000,0.000000,""};
item16[] = {"",7,210,-29.000006,196.000000,-20.999996,204.000000,0.000000,""};
item17[] = {"",7,210,-104.000000,196.000000,-95.999992,204.000000,0.000000,""};
@@ -93,14 +93,13 @@ link45[] = {34,5};
link46[] = {35,37};
link47[] = {36,35};
link48[] = {37,31};
link49[] = {38,17};
link50[] = {38,39};
link51[] = {39,22};
link52[] = {40,28};
link53[] = {41,5};
link54[] = {42,1};
link49[] = {38,39};
link50[] = {39,22};
link51[] = {40,28};
link52[] = {41,5};
link53[] = {42,1};
globals[] = {25.000000,1,0,0,0,640,480,1,101,6316128,1,-671.713867,363.212036,788.169373,-84.187515,713,601,1};
window[] = {2,-1,-1,-32000,-32000,865,154,1362,154,3,730};
window[] = {2,-1,-1,-32000,-32000,799,88,1296,88,3,730};
*//*%FSM</HEAD>*/
class FSM
{
@@ -169,14 +168,17 @@ class FSM
init = /*%FSM<STATEINIT""">*/"_isAlive = alive _agent;" \n
"_target = _agent call zombie_findTargetAgent;" \n
"" \n
"_agent setBehaviour ""SAFE"";" \n
"_agent setCombatMode ""BLUE"";" \n
"_agent forceSpeed 2;" \n
"_agent setSkill 0;" \n
"" \n
"_newDest = _agent getVariable [""myDest"",getposATL _agent];" \n
"if (!isNil ""_newDest"") then {" \n
" if (_newDest distance _myDest > 0) then {" \n
" _myDest = _newDest;" \n
" _agent moveTo _myDest;" \n
" _agent forceSpeed 2;" \n
"// _agent forceSpeed 2;" \n
" };" \n
"};" \n
"" \n
@@ -287,6 +289,7 @@ class FSM
"" \n
"_hasMoved = _doLoiter;" \n
"" \n
"" \n
"_agent disableAI ""FSM"";" \n
"_newDest = getPosATL _agent;" \n
"_timeN = time;" \n
@@ -339,8 +342,11 @@ class FSM
"_isAlive = alive _agent;" \n
"_targetPos = getPosATL _target;" \n
"" \n
"" \n
"//Move to target" \n
"" \n
"_agent setBehaviour ""CARELESS"";" \n
"_agent setCombatMode ""RED"";" \n
"_agent moveTo _targetPos;" \n
"_agent forceSpeed 6;" \n
"" \n
@@ -404,7 +410,7 @@ class FSM
priority = 0.000000;
to="Chase";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _timeN) > 1"/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _timeN) > 2"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_losCheck = _losCheck + 1;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@@ -508,29 +514,6 @@ class FSM
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "Has_Target">*/
class Has_Target
{
priority = 1.000000;
to="Chase";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!(isNull _target)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"//Leader cries out" \n
"if (_isSomeone) then {" \n
" [_agent,""spotted"",2,true] call dayz_zombieSpeak;" \n
"};" \n
"if (!_hasMoved) then {" \n
" _agent setVariable[""doLoiter"",true,true];" \n
"};" \n
"" \n
"//Enable combat timer." \n
"_target setVariable[""startcombattimer"", 1, true];" \n
"" \n
"_countr = 0;" \n
"_losCheck = 0;" \n
"_cantSee = false;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "No_target">*/
class No_target
{