mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
1156 lines
46 KiB
Plaintext
1156 lines
46 KiB
Plaintext
/*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Dog Agent">*/
|
|
/*%FSM<HEAD>*/
|
|
/*
|
|
item0[] = {"init",0,250,-150.000000,-75.000000,-50.000000,-25.000000,0.000000,"init"};
|
|
item1[] = {"idle_exceeded",4,218,0.000000,225.000000,100.000000,275.000000,0.000000,"idle" \n "exceeded"};
|
|
item2[] = {"master_moved",4,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"master" \n "moved"};
|
|
item3[] = {"Moving",2,250,-150.000000,375.000000,-50.000000,425.000000,0.000000,"Moving"};
|
|
item4[] = {"close",4,218,-275.000000,300.000000,-175.000000,350.000000,1.000000,"close"};
|
|
item5[] = {"",7,210,-229.000000,246.000000,-221.000000,254.000000,0.000000,""};
|
|
item6[] = {"Waiting",2,250,-150.000000,225.000000,-50.000000,275.000000,0.000000,"Waiting"};
|
|
item7[] = {"preloaded",4,218,-150.000000,0.000000,-50.000000,50.000000,0.000000,"preloaded"};
|
|
item8[] = {"reorientate",4,218,-150.000000,450.000000,-50.000000,500.000000,0.000000,"reorientate"};
|
|
item9[] = {"Sitting",2,250,150.000000,225.000000,250.000000,275.000000,0.000000,"Sitting"};
|
|
item10[] = {"master_moved",4,218,350.000000,275.000000,450.000000,325.000000,0.000000,"master" \n "moved"};
|
|
item11[] = {"Getting_Up",2,250,525.000000,200.000000,625.000000,250.000000,0.000000,"Getting Up"};
|
|
item12[] = {"Up",4,218,525.000000,500.000000,625.000000,550.000000,0.000000,"Up"};
|
|
item13[] = {"dead",4,218,0.000000,300.000000,100.000000,350.000000,9.000000,"dead"};
|
|
item14[] = {"End",1,250,0.000000,375.000000,100.000000,425.000000,0.000000,"End"};
|
|
item15[] = {"stay",4,218,0.000000,125.000000,100.000000,175.000000,1.000000,"stay"};
|
|
item16[] = {"",7,210,-29.000002,245.999985,-20.999998,254.000015,0.000000,""};
|
|
item17[] = {"",7,210,-29.000000,146.000000,-21.000000,153.999985,0.000000,""};
|
|
item18[] = {"Staying",2,250,150.000000,125.000000,250.000000,175.000000,0.000000,"Staying"};
|
|
item19[] = {"commanded",4,218,350.000000,175.000000,450.000000,225.000000,0.000000,"commanded"};
|
|
item20[] = {"",7,210,271.000000,146.000000,279.000000,154.000000,0.000000,""};
|
|
item21[] = {"",7,210,271.000000,196.000000,279.000000,204.000000,0.000000,""};
|
|
item22[] = {"too_long",4,218,350.000000,125.000000,450.000000,175.000000,0.000000,"too long"};
|
|
item23[] = {"",7,210,271.000000,246.000000,279.000000,254.000000,0.000000,""};
|
|
item24[] = {"",7,210,271.000000,296.000000,279.000000,304.000000,0.000000,""};
|
|
item25[] = {"track",4,218,0.000000,25.000000,100.000000,75.000000,0.000000,"track"};
|
|
item26[] = {"",7,210,-29.000000,46.000008,-21.000000,53.999996,0.000000,""};
|
|
item27[] = {"Tracking",2,250,275.000000,-50.000000,375.000000,0.000000,0.000000,"Tracking"};
|
|
item28[] = {"commanded",4,218,425.000000,-50.000000,525.000000,0.000000,0.000000,"commanded"};
|
|
item29[] = {"Checking",2,250,150.000000,25.000000,250.000000,75.000000,0.000000,"Checking"};
|
|
item30[] = {"has_target",4,218,150.000000,-50.000000,250.000000,0.000000,1.000000,"has target"};
|
|
item31[] = {"no_target",4,218,425.000000,25.000000,525.000000,75.000000,4.000000,"no target"};
|
|
item32[] = {"",7,210,571.000000,-41.500000,579.000000,-33.500000,0.000000,""};
|
|
item33[] = {"",7,210,571.000000,-154.000000,579.000000,-146.000000,0.000000,""};
|
|
item34[] = {"",7,210,396.000000,46.000008,404.000000,53.999989,0.000000,""};
|
|
item35[] = {"",7,210,396.000000,-28.999994,404.000000,-21.000006,0.000000,""};
|
|
item36[] = {"at_target",4,218,350.000000,-125.000000,450.000000,-75.000000,1.000000,"at target"};
|
|
item37[] = {"",7,210,571.000000,-28.999992,579.000000,-21.000008,0.000000,""};
|
|
item38[] = {"",7,210,571.000000,46.000008,579.000000,53.999996,0.000000,""};
|
|
item39[] = {"",7,210,-229.000000,-154.000000,-221.000000,-146.000000,0.000000,""};
|
|
item40[] = {"",7,210,421.000000,-404.000000,429.000000,-396.000000,0.000000,""};
|
|
item41[] = {"reorientate",4,218,225.000000,-125.000000,325.000000,-75.000000,0.000000,"reorientate"};
|
|
item42[] = {"action_init",2,250,-150.000000,75.000000,-50.000000,125.000000,0.000000,"action init"};
|
|
item43[] = {"true",8,218,-150.000000,150.000000,-50.000000,200.000000,0.000000,"true"};
|
|
item44[] = {"commanded",4,218,350.000000,225.000000,450.000000,275.000000,0.000000,"commanded"};
|
|
item45[] = {"",7,210,-304.000000,246.000000,-296.000000,253.999985,0.000000,""};
|
|
item46[] = {"",7,210,-29.000000,321.000000,-21.000000,329.000000,0.000000,""};
|
|
item47[] = {"",7,210,196.000000,196.000000,204.000000,204.000000,0.000000,""};
|
|
item48[] = {"",7,210,46.000000,196.000000,54.000000,204.000000,0.000000,""};
|
|
item49[] = {"",7,210,395.999969,95.999992,404.000000,104.000000,0.000000,""};
|
|
item50[] = {"",7,210,196.000000,96.000000,204.000000,104.000000,0.000000,""};
|
|
item51[] = {"",7,210,-29.000000,96.000000,-21.000000,104.000000,0.000000,""};
|
|
item52[] = {"move",4,218,0.000000,-300.000000,100.000000,-250.000000,8.000000,"move"};
|
|
item53[] = {"Get_Position",2,250,125.000000,-300.000000,225.000000,-250.000000,0.000000,"Get Position"};
|
|
item54[] = {"valid_position",4,218,125.000000,-375.000000,225.000000,-325.000000,0.000000,"valid position"};
|
|
item55[] = {"Moving_1",2,250,250.000000,-375.000000,350.000000,-325.000000,0.000000,"Moving"};
|
|
item56[] = {"no_position",4,218,125.000000,-225.000000,225.000000,-175.000000,0.000000,"no position"};
|
|
item57[] = {"commanded",4,218,250.000000,-225.000000,350.000000,-175.000000,0.000000,"commanded"};
|
|
item58[] = {"",7,210,170.999969,-154.000000,179.000031,-146.000000,0.000000,""};
|
|
item59[] = {"lost",4,218,400.000000,-325.000000,500.000000,-275.000000,0.000000,"lost"};
|
|
item60[] = {"",7,210,658.500000,-354.000000,666.500000,-346.000000,0.000000,""};
|
|
item61[] = {"",7,210,496.000000,-504.000000,504.000000,-496.000000,0.000000,""};
|
|
item62[] = {"",7,210,696.000000,-553.999939,704.000000,-546.000000,0.000000,""};
|
|
item63[] = {"",7,210,-28.999996,-279.000000,-21.000002,-271.000000,0.000000,""};
|
|
item64[] = {"",7,210,296.000000,-404.000000,304.000000,-396.000000,0.000000,""};
|
|
item65[] = {"",7,210,721.000061,-404.000000,728.999939,-396.000000,0.000000,""};
|
|
item66[] = {"",7,210,721.000000,-279.000000,729.000000,-271.000000,0.000000,""};
|
|
item67[] = {"",7,210,721.000000,358.500000,729.000000,366.499969,0.000000,""};
|
|
item68[] = {"",7,210,-29.000000,246.000000,-21.000000,254.000000,0.000000,""};
|
|
item69[] = {"",7,210,120.999992,358.500000,129.000000,366.500000,0.000000,""};
|
|
item70[] = {"",7,210,-29.000000,-354.000000,-21.000000,-346.000000,0.000000,""};
|
|
item71[] = {"player_enter__ve",4,218,-150.000000,-375.000000,-50.000000,-325.000000,2.000000,"player enter " \n "vehicle"};
|
|
item72[] = {"in_vehicle",2,250,-525.000000,-375.000000,-425.000000,-325.000000,0.000000,"in vehicle"};
|
|
item73[] = {"player_exit__veh",4,218,-525.000000,-300.000000,-425.000000,-250.000000,0.000000,"player exit " \n "vehicle"};
|
|
item74[] = {"",7,210,-228.999985,-404.000000,-221.000015,-396.000000,0.000000,""};
|
|
item75[] = {"move_to_vehicle",2,250,-275.000000,-375.000000,-175.000000,-325.000000,0.000000,"move to vehicle"};
|
|
item76[] = {"at_vehicle",4,218,-400.000000,-375.000000,-300.000000,-325.000000,0.000000,"at vehicle"};
|
|
item77[] = {"",7,210,-478.999969,-404.000000,-471.000031,-396.000000,0.000000,""};
|
|
item78[] = {"",7,210,-229.000000,-404.000000,-221.000000,-396.000000,0.000000,""};
|
|
item79[] = {"vehicle_too_far",4,218,-275.000000,-300.000000,-175.000000,-250.000000,0.000000,"vehicle too far"};
|
|
item80[] = {"Wait",2,250,-400.000000,-300.000000,-300.000000,-250.000000,0.000000,"Wait"};
|
|
item81[] = {"call_back",4,218,-400.000000,-225.000000,-300.000000,-175.000000,0.000000,"call back"};
|
|
item82[] = {"",7,210,-354.000000,246.000000,-346.000000,254.000000,0.000000,""};
|
|
item83[] = {"In_Position",4,218,-300.000000,-250.000000,-200.000000,-200.000000,1.000000,"In Position"};
|
|
item84[] = {"reorientate",4,218,-175.000000,-325.000000,-75.000000,-275.000000,0.000000,"reorientate"};
|
|
item85[] = {"",7,210,-479.000000,96.000008,-471.000000,103.999992,0.000000,""};
|
|
item86[] = {"",7,210,96.000000,96.000000,104.000000,104.000000,0.000000,""};
|
|
item87[] = {"",7,210,296.000000,-154.000000,304.000000,-146.000015,0.000000,""};
|
|
item88[] = {"",7,210,471.000000,146.000000,479.000000,154.000000,0.000000,""};
|
|
item89[] = {"",7,210,471.000000,196.000000,479.000000,204.000000,0.000000,""};
|
|
item90[] = {"",7,210,471.000000,246.000000,479.000000,254.000000,0.000000,""};
|
|
item91[] = {"",7,210,471.000000,296.000000,479.000000,304.000000,0.000000,""};
|
|
item92[] = {"",7,210,-304.000000,520.999939,-296.000000,529.000000,0.000000,""};
|
|
item93[] = {"",7,210,-354.000000,246.000000,-346.000000,254.000000,0.000000,""};
|
|
item94[] = {"has_target",4,218,250.000000,-475.000000,350.000000,-425.000000,2.000000,"has target"};
|
|
item95[] = {"chase",2,250,375.000000,-475.000000,475.000000,-425.000000,0.000000,"chase"};
|
|
item96[] = {"reorientate",4,218,375.000000,-550.000000,475.000000,-500.000000,0.000000,"reorientate"};
|
|
item97[] = {"",7,210,658.500000,-454.000000,666.500000,-446.000000,0.000000,""};
|
|
item98[] = {"",7,210,495.999969,-454.000000,504.000000,-446.000000,0.000000,""};
|
|
item99[] = {"",7,210,658.500000,-503.999969,666.500000,-496.000000,0.000000,""};
|
|
item100[] = {"",7,210,496.000000,-554.000000,504.000000,-546.000000,0.000000,""};
|
|
item101[] = {"commanded",4,218,525.000000,-575.000000,625.000000,-525.000000,0.000000,"commanded"};
|
|
item102[] = {"target_lost",4,218,525.000000,-475.000000,625.000000,-425.000000,0.000000,"target lost"};
|
|
item103[] = {"target_dead",4,218,525.000000,-525.000000,625.000000,-475.000000,0.000000,"target dead"};
|
|
item104[] = {"",7,210,696.000000,-154.000000,704.000000,-146.000000,0.000000,""};
|
|
item105[] = {"find_target",4,218,350.000000,-275.000000,450.000000,-225.000000,1.000000,"find target"};
|
|
item106[] = {"DayZ_Dog_Agent_FSM",-1,250,-475.000000,-625.000000,-75.000000,-425.000000,0.000000,"DayZ Dog Agent FSM" \n "Created by Rocket and Alby"};
|
|
item107[] = {"____FAKE____",9,4280,0.000000,0.000000,0.000000,0.000000,0.000000,"____FAKE____"};
|
|
version=1;
|
|
class LayoutItems
|
|
{
|
|
class Item106
|
|
{
|
|
class ItemInfo
|
|
{
|
|
FontFace="Arial";
|
|
FontHeight=19;
|
|
lStyle=1;
|
|
lColor=-1;
|
|
};
|
|
};
|
|
};
|
|
link0[] = {0,7};
|
|
link1[] = {1,9};
|
|
link2[] = {2,3};
|
|
link3[] = {3,4};
|
|
link4[] = {3,8};
|
|
link5[] = {3,46};
|
|
link6[] = {4,5};
|
|
link7[] = {5,6};
|
|
link8[] = {6,2};
|
|
link9[] = {6,13};
|
|
link10[] = {6,16};
|
|
link11[] = {7,42};
|
|
link12[] = {8,3};
|
|
link13[] = {9,13};
|
|
link14[] = {9,23};
|
|
link15[] = {9,47};
|
|
link16[] = {10,91};
|
|
link17[] = {11,12};
|
|
link18[] = {11,67};
|
|
link19[] = {12,92};
|
|
link20[] = {13,14};
|
|
link21[] = {15,18};
|
|
link22[] = {16,1};
|
|
link23[] = {16,17};
|
|
link24[] = {17,15};
|
|
link25[] = {17,51};
|
|
link26[] = {18,20};
|
|
link27[] = {18,50};
|
|
link28[] = {19,89};
|
|
link29[] = {20,21};
|
|
link30[] = {20,22};
|
|
link31[] = {21,19};
|
|
link32[] = {22,88};
|
|
link33[] = {23,24};
|
|
link34[] = {23,44};
|
|
link35[] = {24,10};
|
|
link36[] = {25,29};
|
|
link37[] = {26,25};
|
|
link38[] = {26,63};
|
|
link39[] = {27,35};
|
|
link40[] = {27,36};
|
|
link41[] = {27,41};
|
|
link42[] = {28,37};
|
|
link43[] = {29,30};
|
|
link44[] = {29,34};
|
|
link45[] = {30,27};
|
|
link46[] = {31,38};
|
|
link47[] = {32,33};
|
|
link48[] = {33,87};
|
|
link49[] = {34,31};
|
|
link50[] = {34,49};
|
|
link51[] = {35,28};
|
|
link52[] = {35,34};
|
|
link53[] = {36,27};
|
|
link54[] = {38,32};
|
|
link55[] = {39,5};
|
|
link56[] = {40,65};
|
|
link57[] = {41,27};
|
|
link58[] = {42,43};
|
|
link59[] = {43,6};
|
|
link60[] = {44,90};
|
|
link61[] = {45,5};
|
|
link62[] = {46,13};
|
|
link63[] = {46,68};
|
|
link64[] = {47,48};
|
|
link65[] = {48,15};
|
|
link66[] = {49,50};
|
|
link67[] = {50,86};
|
|
link68[] = {51,26};
|
|
link69[] = {52,53};
|
|
link70[] = {53,54};
|
|
link71[] = {53,56};
|
|
link72[] = {54,55};
|
|
link73[] = {55,57};
|
|
link74[] = {55,59};
|
|
link75[] = {55,64};
|
|
link76[] = {55,94};
|
|
link77[] = {55,105};
|
|
link78[] = {56,58};
|
|
link79[] = {57,87};
|
|
link80[] = {58,39};
|
|
link81[] = {59,55};
|
|
link82[] = {60,55};
|
|
link83[] = {61,100};
|
|
link84[] = {61,103};
|
|
link85[] = {62,104};
|
|
link86[] = {63,52};
|
|
link87[] = {63,70};
|
|
link88[] = {64,40};
|
|
link89[] = {65,66};
|
|
link90[] = {66,67};
|
|
link91[] = {67,69};
|
|
link92[] = {69,13};
|
|
link93[] = {70,71};
|
|
link94[] = {71,75};
|
|
link95[] = {72,73};
|
|
link96[] = {72,77};
|
|
link97[] = {73,85};
|
|
link98[] = {74,64};
|
|
link99[] = {75,76};
|
|
link100[] = {75,78};
|
|
link101[] = {75,79};
|
|
link102[] = {75,84};
|
|
link103[] = {76,72};
|
|
link104[] = {77,78};
|
|
link105[] = {79,80};
|
|
link106[] = {80,78};
|
|
link107[] = {80,81};
|
|
link108[] = {80,83};
|
|
link109[] = {81,82};
|
|
link110[] = {82,45};
|
|
link111[] = {83,80};
|
|
link112[] = {84,75};
|
|
link113[] = {85,42};
|
|
link114[] = {86,13};
|
|
link115[] = {87,58};
|
|
link116[] = {88,89};
|
|
link117[] = {89,11};
|
|
link118[] = {90,11};
|
|
link119[] = {91,90};
|
|
link120[] = {92,45};
|
|
link121[] = {94,95};
|
|
link122[] = {95,40};
|
|
link123[] = {95,96};
|
|
link124[] = {95,98};
|
|
link125[] = {96,95};
|
|
link126[] = {97,60};
|
|
link127[] = {98,61};
|
|
link128[] = {98,102};
|
|
link129[] = {99,97};
|
|
link130[] = {100,101};
|
|
link131[] = {101,62};
|
|
link132[] = {102,97};
|
|
link133[] = {103,99};
|
|
link134[] = {104,33};
|
|
link135[] = {105,55};
|
|
link136[] = {28,107};
|
|
globals[] = {25.000000,1,0,0,0,640,480,1,328,6316128,1,-1050.945190,1340.164185,622.805908,-920.993103,1411,1030,1};
|
|
window[] = {2,-1,-1,-1,-1,1040,260,1468,260,3,1429};
|
|
*//*%FSM</HEAD>*/
|
|
class FSM
|
|
{
|
|
fsmName = "DayZ Dog Agent";
|
|
class States
|
|
{
|
|
/*%FSM<STATE "init">*/
|
|
class init
|
|
{
|
|
name = "init";
|
|
init = /*%FSM<STATEINIT""">*/"_dog = _this select 0;" \n
|
|
"_type = _this select 1;" \n
|
|
"_standing = true;" \n
|
|
"_command = ""none"";" \n
|
|
"_forceWalk = false;" \n
|
|
"_maxSpeed = 1;" \n
|
|
"_maxSpeedInit = _maxSpeed;" \n
|
|
"_forceChange = false;" \n
|
|
"_staySkill = 30;" \n
|
|
"_senseSkill = 300; //x3 for tracking?" \n
|
|
"_target = objNull;" \n
|
|
"_attackTarget = objNull;" \n
|
|
"_target setVariable ['forceWalk',false];" \n
|
|
"_pos = [_dog] call FNC_GetPos;" \n
|
|
"_lastPos = _pos;" \n
|
|
"_move = """";" \n
|
|
"_movePos = [];" \n
|
|
"_watchDog = true;" \n
|
|
"_idleTime = 5;" \n
|
|
"_coolDown = 0;" \n
|
|
"" \n
|
|
"_hunger = 0;" \n
|
|
"_thrist = 0;" \n
|
|
"_actionLieDown = false;" \n
|
|
"" \n
|
|
"_character = player;" \n
|
|
"" \n
|
|
"_actionDir = ""\z\addons\dayz_code\actions\dog\"";" \n
|
|
"" \n
|
|
"_speedVal = [1,8,-1];" \n
|
|
"" \n
|
|
"_dog setVariable [""state"", ""passive"", true];" \n
|
|
"_dog setVariable [""currentSpeed"", _maxSpeed];"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "preloaded">*/
|
|
class preloaded
|
|
{
|
|
priority = 0.000000;
|
|
to="action_init";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"dayz_clientPreload and (!isNil ""_handle"")"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "Moving">*/
|
|
class Moving
|
|
{
|
|
name = "Moving";
|
|
init = /*%FSM<STATEINIT""">*/"_pos = [([(vehicle player)] call FNC_GetPos),1,2,4,0,5,0] call BIS_fnc_findSafePos;" \n
|
|
"" \n
|
|
"_dog moveTo _pos;" \n
|
|
"_dog forceSpeed (_speedVal select _maxSpeed);" \n
|
|
"" \n
|
|
"_waitTime = time;"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "dead">*/
|
|
class dead
|
|
{
|
|
priority = 9.000000;
|
|
to="End";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"!(alive _dog)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "close">*/
|
|
class close
|
|
{
|
|
priority = 1.000000;
|
|
to="Waiting";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"(vehicle player) distance _dog < 5"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "reorientate">*/
|
|
class reorientate
|
|
{
|
|
priority = 0.000000;
|
|
to="Moving";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"((time - _waitTime) > 1)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "Waiting">*/
|
|
class Waiting
|
|
{
|
|
name = "Waiting";
|
|
init = /*%FSM<STATEINIT""">*/"_waitTime = time;" \n
|
|
"_lastpos = _pos;" \n
|
|
"_lostTarget = false;"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "dead">*/
|
|
class dead
|
|
{
|
|
priority = 9.000000;
|
|
to="End";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"!(alive _dog)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "move">*/
|
|
class move
|
|
{
|
|
priority = 8.000000;
|
|
to="Get_Position";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_command == ""move"""/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_command = ""none"";" \n
|
|
"_lost = false;" \n
|
|
"_dog setVariable [""state"", ""aggressive"", true];"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "player_enter__ve">*/
|
|
class player_enter__ve
|
|
{
|
|
priority = 2.000000;
|
|
to="move_to_vehicle";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"vehicle _character != _character"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"diag_log ""PLAYER ENTERED VEHICLE"";"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "stay">*/
|
|
class stay
|
|
{
|
|
priority = 1.000000;
|
|
to="Staying";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_command == ""stay"""/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "track">*/
|
|
class track
|
|
{
|
|
priority = 0.000000;
|
|
to="Checking";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_command == ""track"""/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "idle_exceeded">*/
|
|
class idle_exceeded
|
|
{
|
|
priority = 0.000000;
|
|
to="Sitting";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"((time - _waitTime) > _idleTime) and _standing"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_standing = false;" \n
|
|
"if (!_watchDog) then {" \n
|
|
" _move = ""Dog_LieDown"";" \n
|
|
"} else {" \n
|
|
" _move = ""Dog_SitDown"";" \n
|
|
"};" \n
|
|
"[objNull, _dog, rSwitchMove,_move] call RE;"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "master_moved">*/
|
|
class master_moved
|
|
{
|
|
priority = 0.000000;
|
|
to="Moving";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"(vehicle player) distance _dog > 2"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "Sitting">*/
|
|
class Sitting
|
|
{
|
|
name = "Sitting";
|
|
init = /*%FSM<STATEINIT""">*/"_waitTime = time;" \n
|
|
"_coolDown = (random 4) + 2;"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "dead">*/
|
|
class dead
|
|
{
|
|
priority = 9.000000;
|
|
to="End";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"!(alive _dog)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "stay">*/
|
|
class stay
|
|
{
|
|
priority = 1.000000;
|
|
to="Staying";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_command == ""stay"""/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "master_moved">*/
|
|
class master_moved
|
|
{
|
|
priority = 0.000000;
|
|
to="Getting_Up";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"player distance _dog > 2"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "commanded">*/
|
|
class commanded
|
|
{
|
|
priority = 0.000000;
|
|
to="Getting_Up";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_command != ""none"""/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "Getting_Up">*/
|
|
class Getting_Up
|
|
{
|
|
name = "Getting_Up";
|
|
init = /*%FSM<STATEINIT""">*/"_anim = animationState _dog;" \n
|
|
"if (_anim == ""Dog_SitDown"") then {" \n
|
|
" _move = ""Dog_SitUp"";" \n
|
|
"} else {" \n
|
|
" _move = ""Dog_GetUp"";" \n
|
|
"};" \n
|
|
"" \n
|
|
"[objNull, _dog, rSwitchMove,_move] call RE;" \n
|
|
"_waitTime = time;" \n
|
|
"_standing = true;" \n
|
|
"_actionLieDown = false;"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "dead">*/
|
|
class dead
|
|
{
|
|
priority = 9.000000;
|
|
to="End";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"!(alive _dog)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "Up">*/
|
|
class Up
|
|
{
|
|
priority = 0.000000;
|
|
to="Waiting";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"((time - _waitTime) > 0.5)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "End">*/
|
|
class End
|
|
{
|
|
name = "End";
|
|
init = /*%FSM<STATEINIT""">*/"//qq" \n
|
|
"" \n
|
|
"terminate _heartbeat;" \n
|
|
"" \n
|
|
"player setVariable [""dogID"", 0];"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "Staying">*/
|
|
class Staying
|
|
{
|
|
name = "Staying";
|
|
init = /*%FSM<STATEINIT""">*/"if(_standing) then {" \n
|
|
" _standing = false;" \n
|
|
" if (!_watchDog) then {" \n
|
|
" _move = ""Dog_LieDown"";" \n
|
|
" _actionLieDown = false;" \n
|
|
" } else {" \n
|
|
" _move = ""Dog_SitDown"";" \n
|
|
" _actionLieDown = true;" \n
|
|
" };" \n
|
|
" [objNull, _dog, rSwitchMove,_move] call RE;" \n
|
|
"};" \n
|
|
"" \n
|
|
"_waitTime = time;" \n
|
|
""/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "dead">*/
|
|
class dead
|
|
{
|
|
priority = 9.000000;
|
|
to="End";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"!(alive _dog)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "commanded">*/
|
|
class commanded
|
|
{
|
|
priority = 0.000000;
|
|
to="Getting_Up";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_command != ""stay"""/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"if (_command == ""return"") then {" \n
|
|
" if ((player distance _dog > 5) and (_watchDog)) then {" \n
|
|
" _dog playActionNow ""GestureBark"";" \n
|
|
" [_dog,""dog_bark"",0,false] call dayz_zombieSpeak;" \n
|
|
" };" \n
|
|
"};"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "too_long">*/
|
|
class too_long
|
|
{
|
|
priority = 0.000000;
|
|
to="Getting_Up";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"((time - _waitTime) > _staySkill)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_command = ""none"";"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "Tracking">*/
|
|
class Tracking
|
|
{
|
|
name = "Tracking";
|
|
init = /*%FSM<STATEINIT""">*/"_pos = [([_target] call FNC_GetPos),1,2,4,0,5,0] call BIS_fnc_findSafePos;" \n
|
|
"_dog moveTo _pos;" \n
|
|
"_dog forceSpeed (_speedVal select _maxSpeed);" \n
|
|
"_forceChange = false;" \n
|
|
"" \n
|
|
"_waitTime = time;" \n
|
|
""/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "dead">*/
|
|
class dead
|
|
{
|
|
priority = 9.000000;
|
|
to="End";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"!(alive _dog)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "no_target">*/
|
|
class no_target
|
|
{
|
|
priority = 4.000000;
|
|
to="Waiting";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"isNull _target and ((time - _waitTime) > 2)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_command = ""none"";"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "at_target">*/
|
|
class at_target
|
|
{
|
|
priority = 1.000000;
|
|
to="Tracking";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_dog distance _target < 10"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"if (_watchDog) then {" \n
|
|
" _dog playActionNow ""GestureBark"";" \n
|
|
" [_dog,""dog_bark"",0,false] call dayz_zombieSpeak;" \n
|
|
"};"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "commanded">*/
|
|
class commanded
|
|
{
|
|
priority = 0.000000;
|
|
to="____FAKE____";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_command != ""track"""/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"if (_command == ""return"") then {" \n
|
|
" if ((player distance _dog > 5) and (_watchDog)) then {" \n
|
|
" _dog playActionNow ""GestureBark"";" \n
|
|
" [_dog,""dog_bark"",0,false] call dayz_zombieSpeak;" \n
|
|
" };" \n
|
|
"};"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "reorientate">*/
|
|
class reorientate
|
|
{
|
|
priority = 0.000000;
|
|
to="Tracking";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"((time - _waitTime) > 0.5)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"if ((random 1) < 0.3 and (time - _coolDown > 4) and _dog distance _target > 10 ) then {" \n
|
|
" _dog playActionNow ""GestureSniff"";" \n
|
|
" _coolDown = time;" \n
|
|
"};"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "Checking">*/
|
|
class Checking
|
|
{
|
|
name = "Checking";
|
|
init = /*%FSM<STATEINIT""">*/"_lastPos = [_dog] call FNC_GetPos;" \n
|
|
"" \n
|
|
"_list = ([_dog] call FNC_GetPos) nearEntities [""Animal"",(_senseSkill * 3)];" \n
|
|
"_list = _list - [_dog];" \n
|
|
"" \n
|
|
"if (count _list > 0) then {" \n
|
|
" _target = _list select 0;" \n
|
|
"} else {" \n
|
|
" _target = objNull;" \n
|
|
"};" \n
|
|
"" \n
|
|
"_dog playActionNow ""GestureSniff"";" \n
|
|
"_waitTime = time;"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "dead">*/
|
|
class dead
|
|
{
|
|
priority = 9.000000;
|
|
to="End";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"!(alive _dog)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "no_target">*/
|
|
class no_target
|
|
{
|
|
priority = 4.000000;
|
|
to="Waiting";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"isNull _target and ((time - _waitTime) > 2)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_command = ""none"";"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "has_target">*/
|
|
class has_target
|
|
{
|
|
priority = 1.000000;
|
|
to="Tracking";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"!isNull _target and ((time - _waitTime) > 2)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_lastPos = [_dog] call FNC_GetPos;"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "action_init">*/
|
|
class action_init
|
|
{
|
|
name = "action_init";
|
|
init = /*%FSM<STATEINIT""">*/"_heartbeat = [_dog,_handle] spawn {" \n
|
|
" disableSerialization;" \n
|
|
"" \n
|
|
" _dog = _this select 0;" \n
|
|
" _handle = _this select 1;" \n
|
|
" _handle setFSMVariable [""_thirst"",0];" \n
|
|
" _handle setFSMVariable [""_hunger"",0];" \n
|
|
" " \n
|
|
" _display = uiNamespace getVariable 'DAYZ_GUI_display';" \n
|
|
" _ctrlDogFood = _display displayCtrl 1701;" \n
|
|
" _ctrlDogFood ctrlShow true;" \n
|
|
" _ctrlDogFoodBorder = _display displayCtrl 1501;" \n
|
|
" _ctrlDogFoodBorder ctrlShow true;" \n
|
|
" _ctrlDogWater = _display displayCtrl 1702;" \n
|
|
" _ctrlDogWater ctrlShow true;" \n
|
|
" _ctrlDogWaterBorder = _display displayCtrl 1502;" \n
|
|
" _ctrlDogWaterBorder ctrlShow true;" \n
|
|
" " \n
|
|
" while {alive _dog} do {" \n
|
|
" _vel = velocity _dog;" \n
|
|
" _speed = [0,0,0] distance _vel;" \n
|
|
" _thirst = _handle getFSMVariable ""_thirst"";" \n
|
|
" _hunger = _handle getFSMVariable ""_hunger"";" \n
|
|
" _thirst = _thirst + (0.001 * dayz_scaleLight * _speed) + 0.001;" \n
|
|
" _hunger = _hunger + (0.001 * _speed) + 0.001;" \n
|
|
" _foodVal = 1 - (_hunger / SleepFood);" \n
|
|
" _thirstVal = 1 - (_thirst / SleepWater);" \n
|
|
" " \n
|
|
" _ctrlDogFood ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_foodVal))),(Dayz_GUI_G * _foodVal),(Dayz_GUI_B * _foodVal), 0.5];" \n
|
|
" _ctrlDogWater ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_thirstVal))),(Dayz_GUI_G * _thirstVal),(Dayz_GUI_B * _thirstVal), 0.5];" \n
|
|
" " \n
|
|
" if (_foodVal < 0.2) then {" \n
|
|
" _ctrlDogFood call player_guiControlFlash;" \n
|
|
" };" \n
|
|
" if (_thirstVal < 0.2) then {" \n
|
|
" _ctrlDogWater call player_guiControlFlash;" \n
|
|
" };" \n
|
|
"" \n
|
|
" if (_foodVal <= 0 || _thirstVal <= 0) then {" \n
|
|
" _cantSee = [player, _dog] call dayz_losCheck;" \n
|
|
" while {alive _dog && !(_cantSee)} do {" \n
|
|
" _dog moveTo [0, ((random (10000)) + 1000), 0];" \n
|
|
" sleep 2;" \n
|
|
" _cantSee = [player, _dog] call dayz_losCheck;" \n
|
|
" };" \n
|
|
" deleteVehicle _dog;" \n
|
|
" }; " \n
|
|
" " \n
|
|
" _handle setFSMVariable [""_thirst"",_thirst];" \n
|
|
" _handle setFSMVariable [""_hunger"",_hunger];" \n
|
|
" sleep 0.5;" \n
|
|
" };" \n
|
|
"};" \n
|
|
"" \n
|
|
"_script = [_dog,1,2,[_handle,true]] execVM (_actionDir + ""warn.sqf"");"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "true">*/
|
|
class true
|
|
{
|
|
priority = 0.000000;
|
|
to="Waiting";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "Get_Position">*/
|
|
class Get_Position
|
|
{
|
|
name = "Get_Position";
|
|
init = /*%FSM<STATEINIT""">*/"_pos = screenToWorld [0.5, 0.5];" \n
|
|
""/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "no_position">*/
|
|
class no_position
|
|
{
|
|
priority = 0.000000;
|
|
to="Waiting";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"(count _movePos <= 0)" \n
|
|
""/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "valid_position">*/
|
|
class valid_position
|
|
{
|
|
priority = 0.000000;
|
|
to="Moving_1";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"(count _pos > 0)" \n
|
|
""/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_lostTime = time;"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "Moving_1">*/
|
|
class Moving_1
|
|
{
|
|
name = "Moving_1";
|
|
init = /*%FSM<STATEINIT""">*/"_dog moveTo _pos;" \n
|
|
"_dog forceSpeed (_speedVal select _maxSpeed);" \n
|
|
"_forceChange = false;" \n
|
|
"" \n
|
|
"_waitTime = time;" \n
|
|
"" \n
|
|
"diag_log ""DEBUG: MOVING"";"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "dead">*/
|
|
class dead
|
|
{
|
|
priority = 9.000000;
|
|
to="End";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"!(alive _dog)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "has_target">*/
|
|
class has_target
|
|
{
|
|
priority = 2.000000;
|
|
to="chase";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"!(isNull _attackTarget)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_command = ""none"";" \n
|
|
"if (!moveToCompleted _dog) then {" \n
|
|
" _dog moveTo ([_dog] call FNC_GetPos);" \n
|
|
"};" \n
|
|
"diag_log ""DEBUG: HAS TARGET"";"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "find_target">*/
|
|
class find_target
|
|
{
|
|
priority = 1.000000;
|
|
to="Moving_1";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_dog distance _pos < 100 && (time - _waitTime) > 0.5"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_attackTarget = _dog call dog_findTargetAgent;"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "lost">*/
|
|
class lost
|
|
{
|
|
priority = 0.000000;
|
|
to="Moving_1";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"((time - _lostTime) > 60 && _waitTime > 1) || (_lostTarget && _waitTime > 1)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_dog playActionNow ""GestureSniff"";" \n
|
|
"_pos = [([_dog] call FNC_GetPos),10,90,4,0,5,0] call BIS_fnc_findSafePos;"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "commanded">*/
|
|
class commanded
|
|
{
|
|
priority = 0.000000;
|
|
to="Waiting";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_command != ""none"""/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"if (_command == ""return"") then {" \n
|
|
" if ((player distance _dog > 5) and (_watchDog)) then {" \n
|
|
" _dog playActionNow ""GestureBark"";" \n
|
|
" [_dog,""dog_bark"",0,false] call dayz_zombieSpeak;" \n
|
|
" };" \n
|
|
"};"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "in_vehicle">*/
|
|
class in_vehicle
|
|
{
|
|
name = "in_vehicle";
|
|
init = /*%FSM<STATEINIT""">*/"terminate _heartbeat;" \n
|
|
"" \n
|
|
"deleteVehicle _dog;" \n
|
|
"" \n
|
|
"diag_log ""DOG REMOVED"";"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "player_exit__veh">*/
|
|
class player_exit__veh
|
|
{
|
|
priority = 0.000000;
|
|
to="action_init";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"(vehicle _character == _character)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"if (isNull _dog) then {" \n
|
|
" _dog = createAgent [_type, _Pos, [], 0, ""NONE""];" \n
|
|
" _pos = [([player] call FNC_GetPos),1,3,4,0,5,0] call BIS_fnc_findSafePos;" \n
|
|
" _dog setpos _pos;" \n
|
|
"} ;" \n
|
|
"" \n
|
|
"diag_log ""DOG RECREATED"";"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "move_to_vehicle">*/
|
|
class move_to_vehicle
|
|
{
|
|
name = "move_to_vehicle";
|
|
init = /*%FSM<STATEINIT""">*/"_playerloc = [(vehicle player)] call FNC_GetPos;" \n
|
|
"_dog moveTo _playerloc;" \n
|
|
"" \n
|
|
"diag_log ""DOG MOVING TO VEHICLE"";" \n
|
|
"_waitTime = time;"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "vehicle_too_far">*/
|
|
class vehicle_too_far
|
|
{
|
|
priority = 0.000000;
|
|
to="Wait";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_dog distance (vehicle player) > 300"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"diag_log ""VEHICLE TOO FAR"";"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "reorientate">*/
|
|
class reorientate
|
|
{
|
|
priority = 0.000000;
|
|
to="move_to_vehicle";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"((time - _waitTime) > 0.5)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "at_vehicle">*/
|
|
class at_vehicle
|
|
{
|
|
priority = 0.000000;
|
|
to="in_vehicle";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_dog distance (vehicle player) <= 8"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"diag_log ""DOG AT VEHICLE"";"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "Wait">*/
|
|
class Wait
|
|
{
|
|
name = "Wait";
|
|
init = /*%FSM<STATEINIT""">*/"_pos = [([_dog] call FNC_GetPos),10,90,4,0,5,0] call BIS_fnc_findSafePos;" \n
|
|
"_dog moveTo _pos;"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "In_Position">*/
|
|
class In_Position
|
|
{
|
|
priority = 1.000000;
|
|
to="Wait";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_dog distance _pos < 3"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "call_back">*/
|
|
class call_back
|
|
{
|
|
priority = 0.000000;
|
|
to="Waiting";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_command == ""return"""/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"if ((player distance _dog > 5) and (_watchDog)) then {" \n
|
|
" _dog playActionNow ""GestureBark"";" \n
|
|
" [_dog,""dog_bark"",0,false] call dayz_zombieSpeak;" \n
|
|
"};"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
};
|
|
};
|
|
/*%FSM</STATE>*/
|
|
/*%FSM<STATE "chase">*/
|
|
class chase
|
|
{
|
|
name = "chase";
|
|
init = /*%FSM<STATEINIT""">*/"_attackTarget = _dog call dog_findTargetAgent;" \n
|
|
"" \n
|
|
"if (!(isNull _attackTarget)) then { " \n
|
|
" _pos = getPosATL _attackTarget;" \n
|
|
" _dog moveTo _pos;" \n
|
|
" _dog forceSpeed (_speedVal select _maxSpeed);" \n
|
|
"};" \n
|
|
"" \n
|
|
" _waitTime = time;" \n
|
|
"" \n
|
|
"diag_log ""DEBUG: CHASE"";"/*%FSM</STATEINIT""">*/;
|
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
|
class Links
|
|
{
|
|
/*%FSM<LINK "dead">*/
|
|
class dead
|
|
{
|
|
priority = 9.000000;
|
|
to="End";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"!(alive _dog)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "target_lost">*/
|
|
class target_lost
|
|
{
|
|
priority = 0.000000;
|
|
to="Moving_1";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"(isNull _attackTarget)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_lostTarget = true;" \n
|
|
"diag_log ""DEBUG: TARGET LOST"";"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "target_dead">*/
|
|
class target_dead
|
|
{
|
|
priority = 0.000000;
|
|
to="Moving_1";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"!(alive _attackTarget)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_attackTarget = objNull;" \n
|
|
"_lostTarget = true;" \n
|
|
"diag_log ""DEBUG: TARGET DEAD"";"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "commanded">*/
|
|
class commanded
|
|
{
|
|
priority = 0.000000;
|
|
to="Waiting";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"_command != ""none"""/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"_attackTarget = objNull;" \n
|
|
"_dog setVariable [""state"", ""passive"", true];" \n
|
|
"" \n
|
|
"if (_command == ""return"") then {" \n
|
|
" if ((player distance _dog > 5) and (_watchDog)) then {" \n
|
|
" _dog playActionNow ""GestureBark"";" \n
|
|
" [_dog,""dog_bark"",0,false] call dayz_zombieSpeak;" \n
|
|
" };" \n
|
|
"};"/*%FSM</ACTION""">*/;
|
|
};
|
|
/*%FSM</LINK>*/
|
|
/*%FSM<LINK "reorientate">*/
|
|
class reorientate
|
|
{
|
|
priority = 0.000000;
|
|
to="chase";
|
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
|
condition=/*%FSM<CONDITION""">*/"((time - _waitTime) > 1)"/*%FSM</CONDITION""">*/;
|
|
action=/*%FSM<ACTION""">*/"diag_log ""DEBUG: REORIENTATING"";"/*%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</STATE>*/
|
|
};
|
|
initState="init";
|
|
finalStates[] =
|
|
{
|
|
"End"
|
|
};
|
|
};
|
|
/*%FSM</COMPILE>*/ |