mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
703 lines
25 KiB
Plaintext
703 lines
25 KiB
Plaintext
/*%FSM<COMPILE "F:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, construct">*/
|
|
/*%FSM<HEAD>*/
|
|
/*
|
|
item0[] = {"construct",0,250,-316.429199,-195.383255,-226.429291,-145.383362,0.000000,"construct"};
|
|
item1[] = {"_",8,218,62.332706,-185.990021,114.284866,-157.584717,0.000000,""};
|
|
item2[] = {"instinct",2,250,165.295456,-196.723892,255.295410,-146.723892,0.000000,"instinct"};
|
|
item3[] = {"no_decision",4,218,366.525970,-123.699348,456.525940,-73.699387,10.000000,"no decision"};
|
|
item4[] = {"action",2,250,164.446381,121.731827,254.446365,171.731903,0.000000,"action"};
|
|
item5[] = {"dispose",4,218,37.004036,-291.823761,127.004257,-241.823792,90.000000,"dispose"};
|
|
item6[] = {"_",8,218,182.964218,311.201538,234.916306,339.606750,0.000000,""};
|
|
item7[] = {"reset_vars",2,250,-57.248745,-196.860123,32.751255,-146.860138,0.000000,"reset vars"};
|
|
item8[] = {"_",8,218,-150.031967,-184.788101,-98.079796,-156.382797,0.000000,""};
|
|
item9[] = {"complete",4,218,-57.972878,-94.263466,32.027390,-44.263451,100.000000,"complete"};
|
|
item10[] = {"move",4,218,286.028778,192.150543,376.028778,242.150604,20.000000,"move"};
|
|
item11[] = {"end",1,250,-241.719803,14.907898,-151.719772,64.907913,0.000000,"end"};
|
|
item12[] = {"dispose",4,218,-59.072083,14.028580,30.927921,64.028580,95.000000,"dispose"};
|
|
item13[] = {"do_move",2,250,286.331848,300.982452,376.331848,350.982452,0.000000,"do move"};
|
|
item14[] = {"near_building",4,218,674.880554,-143.328430,764.880676,-93.328377,80.000000,"near building"};
|
|
item15[] = {"instinct_done",4,218,165.528030,-96.910675,255.527969,-46.910683,100.000000,"instinct done"};
|
|
item16[] = {"move",4,218,266.138367,-295.030945,356.138367,-245.030884,50.000000,"move"};
|
|
item17[] = {"wait_action",4,218,373.527924,50.001488,463.527740,100.001457,110.000000,"wait action"};
|
|
item18[] = {"checking_status",2,250,611.751343,-31.961807,701.751221,18.038223,0.000000,"checking status"};
|
|
item19[] = {"see_target",4,4314,553.701416,-144.674866,643.701538,-94.674820,90.000000,"see target"};
|
|
item20[] = {"checked",4,218,612.020508,61.020790,702.020386,111.020844,10.000000,"checked"};
|
|
item21[] = {"done",4,218,476.283447,-31.286667,566.283386,18.713348,100.000000,"done"};
|
|
item22[] = {"construct_smash",4,218,165.596268,-331.217682,255.596191,-281.217590,60.000000,"construct smash"};
|
|
item23[] = {"return",2,250,360.850586,-30.593140,450.850647,19.406860,0.000000,"return"};
|
|
item24[] = {"to_action",4,218,277.703308,21.529037,367.703308,71.529037,10.000000,"to action"};
|
|
item25[] = {"to_instinct",4,218,287.631317,-100.089363,377.631317,-50.089355,5.000000,"to instinct"};
|
|
item26[] = {"smash",4,218,-81.683311,146.820755,8.316697,196.820755,30.000000,"smash"};
|
|
item27[] = {"interrupt",4,218,58.118843,-94.064064,148.118866,-44.064060,90.000000,"interrupt"};
|
|
item28[] = {"construct_smash",2,250,-82.893753,370.386627,7.106274,420.386658,0.000000,"construct smash"};
|
|
item29[] = {"wander",4,218,320.950836,-243.494019,410.950836,-193.494019,40.000000,"wander"};
|
|
item30[] = {"wander",4,218,370.444092,167.573929,460.444061,217.573975,30.000000,"wander"};
|
|
item31[] = {"do_wander",2,250,370.747131,376.849396,460.747131,426.849396,0.000000,"do wander"};
|
|
item32[] = {"health_check",4,218,726.020203,-74.284813,816.020264,-24.284767,70.000000,"health check"};
|
|
item33[] = {"____FAKE____",9,1320,0.000000,0.000000,0.000000,0.000000,0.000000,"____FAKE____"};
|
|
link0[] = {0,8};
|
|
link1[] = {1,2};
|
|
link2[] = {2,3};
|
|
link3[] = {2,5};
|
|
link4[] = {2,15};
|
|
link5[] = {2,16};
|
|
link6[] = {2,29};
|
|
link7[] = {3,18};
|
|
link8[] = {4,9};
|
|
link9[] = {4,10};
|
|
link10[] = {4,12};
|
|
link11[] = {4,17};
|
|
link12[] = {4,26};
|
|
link13[] = {4,27};
|
|
link14[] = {4,30};
|
|
link15[] = {5,2};
|
|
link16[] = {6,4};
|
|
link17[] = {7,1};
|
|
link18[] = {8,7};
|
|
link19[] = {9,7};
|
|
link20[] = {10,13};
|
|
link21[] = {12,11};
|
|
link22[] = {13,6};
|
|
link23[] = {14,18};
|
|
link24[] = {15,4};
|
|
link25[] = {16,2};
|
|
link26[] = {17,18};
|
|
link27[] = {18,14};
|
|
link28[] = {18,19};
|
|
link29[] = {18,20};
|
|
link30[] = {18,21};
|
|
link31[] = {18,32};
|
|
link32[] = {19,18};
|
|
link33[] = {20,18};
|
|
link34[] = {21,23};
|
|
link35[] = {22,2};
|
|
link36[] = {23,24};
|
|
link37[] = {23,25};
|
|
link38[] = {24,4};
|
|
link39[] = {25,2};
|
|
link40[] = {26,28};
|
|
link41[] = {27,7};
|
|
link42[] = {28,6};
|
|
link43[] = {29,2};
|
|
link44[] = {30,31};
|
|
link45[] = {31,6};
|
|
link46[] = {32,18};
|
|
link47[] = {33,22};
|
|
globals[] = {0.000000,0,0,0,16777215,640,480,1,169,6316128,1,73.118919,857.202637,468.231750,-240.399475,1008,911,1};
|
|
window[] = {2,-1,-1,-1,-1,725,200,1225,200,3,1026};
|
|
*//*%FSM</HEAD>*/
|
|
class FSM
|
|
{
|
|
fsmName = "construct";
|
|
class States
|
|
{
|
|
/*%FSM<STATE "construct">*/
|
|
class construct
|
|
{
|
|
name = "construct";
|
|
init = /*%FSM<STATEINIT""">*/"_construct = _this select 0;" \n
|
|
"_trgt = player;" \n
|
|
"" \n
|
|
"//_construct setBehaviour ""COMBAT"";" \n
|
|
"" \n
|
|
"_constructNames=[""Rocky"",""Miner"",""Plate""];" \n
|
|
"_constructName = _constructNames select (floor(random count _constructNames));" \n
|
|
"" \n
|
|
"_entsArr = [""Epoch_Male_F"",""Epoch_Female_F"",""Epoch_Sapper_F"",""Fin_random_EPOCH"",""Alsatian_Random_EPOCH"",""Epoch_cloak_F"",""b_survivor_F"",""Epoch_Female_Camo_F""];" \n
|
|
"_plyArr = [""Epoch_Male_F"",""Epoch_Female_F"",""b_survivor_F"",""Epoch_Female_Camo_F""];" \n
|
|
"_trgtArr = [""Epoch_Male_F"",""Epoch_Female_F"",""b_survivor_F"",""Epoch_Female_Camo_F""];" \n
|
|
"_vehArray = [""Car""];" \n
|
|
"_tRange = 20;" \n
|
|
"_sRange = 150;" \n
|
|
"_vRange = 50;" \n
|
|
"_maxTravelTime = 480;" \n
|
|
"_trgtZ = 0;" \n
|
|
"_t = diag_tickTime;" \n
|
|
"_u = _t;" \n
|
|
"" \n
|
|
"_dirTo = 0;" \n
|
|
"_lDist = 0;" \n
|
|
"_checkEntry = """";" \n
|
|
"" \n
|
|
"_constructPos=[0,0,0];" \n
|
|
"_trgtPos=[0,0,0];" \n
|
|
"_hidePos = [0,0,0];" \n
|
|
"_nrPlyrs = [];" \n
|
|
"" \n
|
|
"_nrBuild = nearestBuilding _construct;" \n
|
|
"_buildBash = false;" \n
|
|
"_doSmash = false;" \n
|
|
"_doWander = false;" \n
|
|
"" \n
|
|
"//Behaviour" \n
|
|
"_fearTrigger = 12;" \n
|
|
"_angerTrigger = 24;" \n
|
|
"_lAnger = 0;" \n
|
|
"_lFear = 0;" \n
|
|
"_lBrave = 0;" \n
|
|
"" \n
|
|
"//construct Vars" \n
|
|
"" \n
|
|
"_doMove = false;" \n
|
|
"_sanityCheckDone = false;" \n
|
|
"_canSee = false;" \n
|
|
"_nrTrgts = [];" \n
|
|
"" \n
|
|
"_sanityCheck = 0;" \n
|
|
"" \n
|
|
"" \n
|
|
"_doHide = false;" \n
|
|
"_doAttack = false;" \n
|
|
"_firedNear = 0;" \n
|
|
"" \n
|
|
"_lootVar = 0;" \n
|
|
"" \n
|
|
"" \n
|
|
"//DEBUG" \n
|
|
"_doDebug = false;" \n
|
|
"_count = 0;" \n
|
|
"_debugDo = ""INIT"";" \n
|
|
"_mkrName = """";" \n
|
|
"_dWait = 0;" \n
|
|
"_strDebug = """";" \n
|
|
"_constructFeels = ""STARTING"";" \n
|
|
"axeCount = 0;" \n
|
|
"_strMoveTo = """";" \n
|
|
"" \n
|
|
"" \n
|
|
"" \n
|
|
"" \n
|
|
"" \n
|
|
"" \n
|
|
"" \n
|
|
"" \n
|
|
""/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "_">*/
|
|
class _
|
|
{
|
|
priority = 0.000000;
|
|
to="reset_vars";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "instinct">*/
|
|
class instinct
|
|
{
|
|
name = "instinct";
|
|
init = /*%FSM<STATEINIT""">*/"_t = diag_tickTime;" \n
|
|
"" \n
|
|
"if(_doDebug)then{" \n
|
|
"systemChat format [""Instinct:%1 | D:%2 | M:%3 | S:%4"",diag_tickTime,_decisionMade,_doMove,_canSee];" \n
|
|
"};" \n
|
|
"" \n
|
|
"" \n
|
|
"" \n
|
|
""/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "instinct_done">*/
|
|
class instinct_done
|
|
{
|
|
priority = 100.000000;
|
|
to="action";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_decisionMade;"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_t = diag_tickTime;" \n
|
|
""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "dispose">*/
|
|
class dispose
|
|
{
|
|
priority = 90.000000;
|
|
to="instinct";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"((_trgt distance _construct) > (_sRange * 4)) || !(alive _construct);"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_doDispose = true;" \n
|
|
"_decisionMade = true;" \n
|
|
"_actionDone = false;"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "move">*/
|
|
class move
|
|
{
|
|
priority = 50.000000;
|
|
to="instinct";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_canSee"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_doMove = true;" \n
|
|
"_decisionMade = true;"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "wander">*/
|
|
class wander
|
|
{
|
|
priority = 40.000000;
|
|
to="instinct";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"!_canSee"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_doWander = true;" \n
|
|
"_decisionMade = true;"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "no_decision">*/
|
|
class no_decision
|
|
{
|
|
priority = 10.000000;
|
|
to="checking_status";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"!_decisionMade && diag_tickTime - _t > 3;"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_checkEntry = ""instinct"";" \n
|
|
"_sanityCheck = 100;"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "action">*/
|
|
class action
|
|
{
|
|
name = "action";
|
|
init = /*%FSM<STATEINIT""">*/"" \n
|
|
"" \n
|
|
"if(_doDebug)then{" \n
|
|
"systemChat format [""Action:%1 | %2"",diag_tickTime,_debugDo];" \n
|
|
"};"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "wait_action">*/
|
|
class wait_action
|
|
{
|
|
priority = 110.000000;
|
|
to="checking_status";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"diag_tickTime > _u + 4;"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_checkEntry = ""action"";" \n
|
|
"_sanityCheck = 100;"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "complete">*/
|
|
class complete
|
|
{
|
|
priority = 100.000000;
|
|
to="reset_vars";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/"if(_doDebug)then{" \n
|
|
"" \n
|
|
"hint format [""CONSTRUCT\n%1\nMove:%2\nSmash:%3\nWait:%4"",_debugDo,_doMove,_doSmash,_sWait];" \n
|
|
"};"/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_actionDone && ((call compile _criteria) || (diag_tickTime > (_t + _sWait)));"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"" \n
|
|
"if(!isNil ""_criteriaMetAction"")then{" \n
|
|
"call _criteriaMetAction;" \n
|
|
"};" \n
|
|
"" \n
|
|
"if(_doDebug)then{" \n
|
|
"hint format [""CONSTRUCT\n%1\nMove:%2\nSmash:%3\nWait:%4"",_debugDo,_doMove,_doSmash,_sWait];" \n
|
|
"systemChat format [""Complete:%1"",diag_tickTime];" \n
|
|
"};" \n
|
|
"" \n
|
|
""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "dispose">*/
|
|
class dispose
|
|
{
|
|
priority = 95.000000;
|
|
to="end";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"(_doDispose || !(alive _construct)) && (diag_tickTime - _t) > 120;"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"if(_doDebug)then{" \n
|
|
"_debugDo = ""Dispose"";" \n
|
|
"hint format [""CONSTRUCT\n%1\nAlive: %2"",_debugDo, alive _construct];" \n
|
|
"};"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "interrupt">*/
|
|
class interrupt
|
|
{
|
|
priority = 90.000000;
|
|
to="reset_vars";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"(_allowInterrupt && (call compile _interruptReason));"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "smash">*/
|
|
class smash
|
|
{
|
|
priority = 30.000000;
|
|
to="construct_smash";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_doSmash;"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_doSmash = false;"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "wander">*/
|
|
class wander
|
|
{
|
|
priority = 30.000000;
|
|
to="do_wander";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_doWander;"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_doWander = false;"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "move">*/
|
|
class move
|
|
{
|
|
priority = 20.000000;
|
|
to="do_move";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_doMove;"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_doMove = false;"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "reset_vars">*/
|
|
class reset_vars
|
|
{
|
|
name = "reset_vars";
|
|
init = /*%FSM<STATEINIT""">*/"//Default Vars" \n
|
|
"_rnd = 0;" \n
|
|
"_actionDone = false;" \n
|
|
"_decisionMade = false;" \n
|
|
"_sWait = 0;" \n
|
|
"_doDispose = false;" \n
|
|
"_chooseTarget = false;" \n
|
|
"_criteria = Nil;" \n
|
|
"_criteriaMet = false;" \n
|
|
"_allowInterrupt = false;" \n
|
|
"_interruptReason = ""(false)"";" \n
|
|
"" \n
|
|
"_moveTo = [0,0,0];" \n
|
|
"" \n
|
|
"//Brain Vars" \n
|
|
"_override = false;" \n
|
|
"_criteria =""(false)"";" \n
|
|
"_criteriaMetAction = nil;" \n
|
|
"" \n
|
|
"//Feeling Vars" \n
|
|
"_nrTrgts = [];" \n
|
|
"_isThreatened = false;" \n
|
|
"_isSafe = false;" \n
|
|
"_feelingDone = false;" \n
|
|
"" \n
|
|
"" \n
|
|
"//construct Vars" \n
|
|
"" \n
|
|
"" \n
|
|
"" \n
|
|
"" \n
|
|
""/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "_">*/
|
|
class _
|
|
{
|
|
priority = 0.000000;
|
|
to="instinct";
|
|
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""">*/"deleteVehicle _construct;" \n
|
|
"" \n
|
|
"if(_doDebug)then{" \n
|
|
"axeDo = Format[""Dispose | Alive:%1 | Distance: %2"",alive _construct,player distance _construct];" \n
|
|
"};"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "do_move">*/
|
|
class do_move
|
|
{
|
|
name = "do_move";
|
|
init = /*%FSM<STATEINIT""">*/"_construct forceSpeed 5;" \n
|
|
"_constructPos = getPos _construct;" \n
|
|
"" \n
|
|
"_moveTo = getPos _trgt;" \n
|
|
"_construct doMove _moveTo;" \n
|
|
"" \n
|
|
"_sWait = ((_construct distance _moveTo) / 2) min 18;" \n
|
|
"_actionDone = true;" \n
|
|
"_t = diag_tickTime;" \n
|
|
"_criteria = ""((_construct distance _moveTo)< 6)"";" \n
|
|
"" \n
|
|
"" \n
|
|
"//Session Vars" \n
|
|
"" \n
|
|
"" \n
|
|
"if(_doDebug)then{" \n
|
|
"_debugDo = ""Move"";" \n
|
|
"};"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "_">*/
|
|
class _
|
|
{
|
|
priority = 0.000000;
|
|
to="action";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "checking_status">*/
|
|
class checking_status
|
|
{
|
|
name = "checking_status";
|
|
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "done">*/
|
|
class done
|
|
{
|
|
priority = 100.000000;
|
|
to="return";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_sanityCheck < 1;"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "see_target">*/
|
|
class see_target
|
|
{
|
|
priority = 90.000000;
|
|
to="checking_status";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_sanityCheck > 90;"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_canSee = false;" \n
|
|
"_nrTrgts = (getPosATL _construct) nearEntities [_trgtArr, _sRange];" \n
|
|
"if(count _nrTrgts >0)then{" \n
|
|
"{" \n
|
|
"if(alive _x)then{" \n
|
|
"if(!lineIntersects [aimPos _construct, aimPos _x, _construct, _x]) exitWith {_canSee = true;_trgt = _x};" \n
|
|
"};" \n
|
|
"}forEach _nrTrgts;" \n
|
|
"};" \n
|
|
"if(_doDebug)then{" \n
|
|
"systemChat format [""SEE:%1 | %2"",_canSee,_trgt];" \n
|
|
"};" \n
|
|
"_sanityCheck = 90;" \n
|
|
""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "near_building">*/
|
|
class near_building
|
|
{
|
|
priority = 80.000000;
|
|
to="checking_status";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_sanityCheck > 80;"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_buildBash = false;" \n
|
|
"_nrBuild = nearestBuilding _construct;" \n
|
|
"" \n
|
|
"if((_nrBuild distance _construct)< 16)then{" \n
|
|
"_buildBash = true;" \n
|
|
"_nrBuild setdamage 1;" \n
|
|
"};" \n
|
|
"" \n
|
|
"" \n
|
|
"_sanityCheck = 80;" \n
|
|
""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "health_check">*/
|
|
class health_check
|
|
{
|
|
priority = 70.000000;
|
|
to="checking_status";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_sanityCheck > 70;"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"if(damage _construct > 0.4)then{" \n
|
|
"_construct setDamage 0;" \n
|
|
"};" \n
|
|
"" \n
|
|
"" \n
|
|
"_sanityCheck = 70;"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "checked">*/
|
|
class checked
|
|
{
|
|
priority = 10.000000;
|
|
to="checking_status";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_sanityCheck > 10;"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_sanityCheck = 0 ;" \n
|
|
"" \n
|
|
"" \n
|
|
""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "return">*/
|
|
class return
|
|
{
|
|
name = "return";
|
|
init = /*%FSM<STATEINIT""">*/"" \n
|
|
"_u = diag_tickTime;" \n
|
|
"" \n
|
|
"if(_doDebug)then{" \n
|
|
"systemChat format [""RETURN:%1 | %2"",diag_tickTime,_checkEntry];" \n
|
|
"};"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "to_action">*/
|
|
class to_action
|
|
{
|
|
priority = 10.000000;
|
|
to="action";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_checkEntry == ""action"";"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_checkEntry = """";" \n
|
|
""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "to_instinct">*/
|
|
class to_instinct
|
|
{
|
|
priority = 5.000000;
|
|
to="instinct";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_checkEntry == ""instinct"";"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_checkEntry = """";" \n
|
|
""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "construct_smash">*/
|
|
class construct_smash
|
|
{
|
|
name = "construct_smash";
|
|
init = /*%FSM<STATEINIT""">*/"_nrBuild setdamage 1;" \n
|
|
"" \n
|
|
"" \n
|
|
"" \n
|
|
"_sWait = 1.5;" \n
|
|
"_actionDone = true;" \n
|
|
"_t = diag_tickTime;" \n
|
|
"_criteria = ""(false)"";" \n
|
|
"" \n
|
|
"" \n
|
|
"if(_doDebug)then{" \n
|
|
"_debugDo = format[""Smash | Dir:%1"",_nrBuild];" \n
|
|
"};"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "_">*/
|
|
class _
|
|
{
|
|
priority = 0.000000;
|
|
to="action";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "do_wander">*/
|
|
class do_wander
|
|
{
|
|
name = "do_wander";
|
|
init = /*%FSM<STATEINIT""">*/"_constructPos = getPos _construct;" \n
|
|
"_constructMoveTo = [_constructPos,18,80,5,0,5,0] call BIS_fnc_findSafePos;" \n
|
|
"_construct doMove _constructMoveTo;" \n
|
|
"_construct forceSpeed 3;" \n
|
|
"" \n
|
|
"_sWait = ((_construct distance _moveTo) / 2) min 18;" \n
|
|
"_actionDone = true;" \n
|
|
"_t = diag_tickTime;" \n
|
|
"_criteria = ""((_construct distance _moveTo)< 6)"";" \n
|
|
"" \n
|
|
"" \n
|
|
"//Session Vars" \n
|
|
"" \n
|
|
"" \n
|
|
"if(_doDebug)then{" \n
|
|
"_debugDo = ""Wander"";" \n
|
|
"};"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "_">*/
|
|
class _
|
|
{
|
|
priority = 0.000000;
|
|
to="action";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "____FAKE____">*/
|
|
class ____FAKE____
|
|
{
|
|
name = "____FAKE____";
|
|
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "construct_smash">*/
|
|
class construct_smash
|
|
{
|
|
priority = 60.000000;
|
|
to="instinct";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_buildBash;"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_doSmash = true;" \n
|
|
"_decisionMade = true;"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
};
|
|
initState="construct";
|
|
finalStates[] =
|
|
{
|
|
"end"
|
|
};
|
|
};
|
|
/*%FSM</COMPILE>*/
|