Move unused functions to another folder

This commit is contained in:
AirwavesMan
2020-06-10 17:03:31 +02:00
parent 11f10829cb
commit ac79d91ca0
37 changed files with 185 additions and 250 deletions

View File

@@ -1,359 +0,0 @@
/*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Zombie Combat Agent">*/
/*%FSM<HEAD>*/
/*
item0[] = {"init",0,250,-150.000000,-250.000000,-50.000000,-200.000000,0.000000,"init"};
item1[] = {"End",1,250,175.000000,-250.000000,275.000000,-200.000000,0.000000,"End"};
item2[] = {"Attack",4,218,-150.000000,425.000000,-50.000000,475.000000,0.000000,"Attack"};
item3[] = {"Not_Alive",4,218,50.000000,300.000000,150.000000,350.000000,5.000000,"Not" \n "Alive"};
item4[] = {"Nobody_Near",4,218,50.000000,350.000000,150.000000,400.000000,4.000000,"Nobody" \n "Near"};
item5[] = {"",7,210,-29.000042,321.000000,-20.999958,329.000000,0.000000,""};
item6[] = {"",7,210,-29.000042,370.999939,-20.999958,379.000061,0.000000,""};
item7[] = {"true",8,218,-150.000000,-175.000000,-50.000000,-125.000000,0.000000,"true"};
item8[] = {"Begin",2,250,-150.000000,-100.000000,-50.000000,-50.000000,0.000000,"Begin"};
item9[] = {"Has_Target",4,218,-150.000000,125.000000,-50.000000,175.000000,1.000000,"Has" \n "Target"};
item10[] = {"Chase",2,250,-150.000000,300.000000,-50.000000,350.000000,0.000000,"Chase"};
item11[] = {"",7,210,221.000000,371.000000,229.000000,379.000000,0.000000,""};
item12[] = {"moveToCompleted",4,218,-25.000000,200.000000,75.000000,250.000000,0.000000,"moveToCompleted"};
item13[] = {"",7,210,221.000000,233.500000,229.000000,241.500000,0.000000,""};
item14[] = {"",7,210,221.000000,321.000000,229.000000,329.000000,0.000000,""};
item15[] = {"is_Dedicated",4,218,50.000000,-250.000000,150.000000,-200.000000,5.000000,"is" \n "Dedicated"};
item16[] = {"Cleanup_",2,250,175.000000,150.000000,275.000000,200.000000,0.000000,"Cleanup?"};
item17[] = {"nobody_around",4,218,175.000000,-75.000000,275.000000,-25.000000,0.000000,"nobody" \n "around"};
item18[] = {"someone_here",4,218,300.000000,150.000000,400.000000,200.000000,0.000000,"someone" \n "here"};
item19[] = {"wait",2,250,300.000000,75.000000,400.000000,125.000000,0.000000,"wait"};
item20[] = {"time_up",4,218,300.000000,-75.000000,400.000000,-25.000000,0.000000,"time" \n "up"};
item21[] = {"",7,210,346.000000,8.500000,354.000000,16.500000,0.000000,""};
item22[] = {"",7,210,221.000000,8.500000,229.000000,16.500000,0.000000,""};
item23[] = {"Time_Check",4,218,425.000000,75.000000,525.000000,125.000000,0.000000,"Time" \n "Check"};
item24[] = {"",7,210,346.000000,-166.500000,354.000000,-158.500000,0.000000,""};
item25[] = {"",7,210,221.000000,-166.500000,229.000000,-158.500000,0.000000,""};
item26[] = {"deleted",4,218,425.000000,-75.000000,525.000000,-25.000000,0.000000,"deleted"};
item27[] = {"",7,210,471.000000,-166.500000,479.000000,-158.500000,0.000000,""};
item28[] = {"",7,210,471.000000,8.500000,479.000000,16.500000,0.000000,""};
item29[] = {"Time_Check",4,4314,-275.000000,300.000000,-175.000000,350.000000,0.000000,"Time Check"};
item30[] = {"____FAKE____",9,1200,0.000000,0.000000,0.000000,0.000000,0.000000,"____FAKE____"};
link0[] = {0,7};
link1[] = {0,15};
link2[] = {2,10};
link3[] = {3,14};
link4[] = {4,11};
link5[] = {5,3};
link6[] = {5,6};
link7[] = {6,4};
link8[] = {7,8};
link9[] = {8,9};
link10[] = {9,10};
link11[] = {10,2};
link12[] = {10,5};
link13[] = {10,29};
link14[] = {11,14};
link15[] = {13,16};
link16[] = {14,13};
link17[] = {15,1};
link18[] = {16,18};
link19[] = {16,22};
link20[] = {17,25};
link21[] = {18,19};
link22[] = {19,21};
link23[] = {19,23};
link24[] = {20,24};
link25[] = {21,20};
link26[] = {21,22};
link27[] = {21,28};
link28[] = {22,17};
link29[] = {23,19};
link30[] = {24,25};
link31[] = {25,1};
link32[] = {26,27};
link33[] = {27,24};
link34[] = {28,26};
link35[] = {29,10};
link36[] = {12,30};
link37[] = {30,12};
globals[] = {25.000000,1,0,0,0,640,480,1,163,6316128,1,-438.144928,688.129517,520.129150,-284.928619,838,1030,1};
window[] = {2,-1,-1,-1,-1,910,130,1338,130,3,856};
*//*%FSM</HEAD>*/
class FSM
{
fsmName = "DayZ Zombie Combat Agent";
class States
{
/*%FSM<STATE "init">*/
class init
{
name = "init";
init = /*%FSM<STATEINIT""">*/"_position = _this select 0;" \n
"_agent = _this select 1;" \n
"_target = _this select 2;" \n
"" \n
"" \n
"diag_log (""Agent Initialized: "" + str(_this));"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "is_Dedicated">*/
class is_Dedicated
{
priority = 5.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"isDedicated"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "true">*/
class true
{
priority = 0.000000;
to="Begin";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(!isNil 'dayz_clientPreload' && {dayz_clientPreload}) && !(isNull _agent)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "End">*/
class End
{
name = "End";
init = /*%FSM<STATEINIT""">*/"if (!isDedicated) then {" \n
" if (!isNull _agent) then {" \n
" deleteVehicle _agent;" \n
" };" \n
"} else {" \n
" [_agent] call zombie_findOwner;" \n
"};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Begin">*/
class Begin
{
name = "Begin";
init = /*%FSM<STATEINIT""">*/"_array = [];" \n
"" \n
"_bodyStay = 60;" \n
"" \n
"_timeN = time;" \n
"//hint ""run local zombie"";" \n
"_isSomeone = true;" \n
"" \n
"_targetPos = [];" \n
"_countr = 0;" \n
"" \n
"//Spawn roaming script (individual to unit)" \n
"_entityTime = time;" \n
""/*%FSM</STATEINIT""">*/;
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""">*/"_countr = 0;" \n
"_losCheck = 0;" \n
"_cantSee = false;" \n
"_agent forceSpeed 6;" \n
"_targetPos = getPosATL _target;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Chase">*/
class Chase
{
name = "Chase";
init = /*%FSM<STATEINIT""">*/"_timeN = diag_tickTime;" \n
"_timeP = diag_tickTime;" \n
"" \n
"_isAlive = alive _agent;" \n
"_targetPos = getPosATL _target;" \n
"_agent moveTo _targetPos;" \n
"" \n
"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],dayz_canDelete];" \n
"_isSomeone = ({isPlayer _x} count _list) > 0;" \n
"" \n
"if (_agent distance _target > 10) then {" \n
" _agent setUnitPos ""middle"";" \n
"};" \n
"" \n
" "/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "Not_Alive">*/
class Not_Alive
{
priority = 5.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_isAlive"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"diag_log (""Not Alive"");" \n
"dayz_swarmSpawnZombies = dayz_swarmSpawnZombies - 1;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Nobody_Near">*/
class Nobody_Near
{
priority = 4.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_isSomeone"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"dayz_swarmSpawnZombies = dayz_swarmSpawnZombies - 1;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Time_Check">*/
class Time_Check
{
priority = 0.000000;
to="Chase";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(diag_tickTime - _timeP) > 3"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Attack">*/
class Attack
{
priority = 0.000000;
to="Chase";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_agent distance _target < 3 AND (diag_tickTime - _timeN) > 1"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_vehicle = (vehicle player);" \n
"_hpList = _vehicle call vehicle_getHitpoints;" \n
"_hp = _hpList call BIS_fnc_selectRandom;" \n
"_wound = getText(configFile >> ""cfgVehicles"" >> (typeOf _vehicle) >> ""HitPoints"" >> _hp >> ""name"");" \n
"" \n
"[_agent, _wound] spawn player_zombieSwarmAttack;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Cleanup_">*/
class Cleanup_
{
name = "Cleanup_";
init = /*%FSM<STATEINIT""">*/"_waitStart = time;" \n
"" \n
"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],dayz_canDelete];" \n
"_isSomeone = ({isPlayer _x} count _list) > 0;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "nobody_around">*/
class nobody_around
{
priority = 0.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_isSomeone"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"dayz_spawnZombies = dayz_spawnZombies - 1;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "someone_here">*/
class someone_here
{
priority = 0.000000;
to="wait";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_isSomeone"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "wait">*/
class wait
{
name = "wait";
init = /*%FSM<STATEINIT""">*/"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],dayz_canDelete];" \n
"_isSomeone = ({isPlayer _x} count _list) > 0;" \n
"" \n
"_timeN = time;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "time_up">*/
class time_up
{
priority = 0.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _waitStart) > 300"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "nobody_around">*/
class nobody_around
{
priority = 0.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_isSomeone"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"dayz_spawnZombies = dayz_spawnZombies - 1;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "deleted">*/
class deleted
{
priority = 0.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"isNull _agent;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Time_Check">*/
class Time_Check
{
priority = 0.000000;
to="wait";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _timeN) > 30"/*%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 "moveToCompleted">*/
class moveToCompleted
{
priority = 0.000000;
to="____FAKE____";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"moveToCompleted _agent;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
};
initState="init";
finalStates[] =
{
"End"
};
};
/*%FSM</COMPILE>*/

View File

@@ -1,126 +0,0 @@
#include "scheduler.hpp"
sched_achievement_init = {
private ["_timewasterCounter","_buildingList","_buildingCounter"];
//following achievements are monitored in this task
achievement_LitterCount = 0;
achievement_Gut = false;
// following achievements are monitored and saved elsewhere
achievement_Raw = false;
achievement_Fire = false;
achievement_SteadyAim = false;
achievement_Marksman = false;
achievement_Sniper = false;
// variables for the monitoring
_timewasterCounter = diag_ticktime;
_buildingList = [];
_buildingCounter = [0,0,0,0,0,0,0,0,0];
[_timewasterCounter, _buildingList, _buildingCounter]
};
sched_achievement = {
HIDE_FSM_VARS
private ["_timewasterCounter","_buildingList","_buildingCounter","_buildingAchivement","_buildingType","_buildingLimit","_building","_matchType","_count", "_o"];
_timewasterCounter = _this select 0;
_buildingList = _this select 1;
_buildingCounter = _this select 2;
_buildingAchivement = [
[""], // Achievement #2
["Land_A_GeneralStore_01a","Land_A_GeneralStore_01"], // Achievement #3 (5 stores)
["Land_A_GeneralStore_01a","Land_A_GeneralStore_01"], // Achievement #4 (10 stores)
["Land_A_Hospital"], // Achievement #5
["Land_A_Office01"], // Achievement #6
["Land_a_stationhouse"], // Achievement #7
["Land_A_Pub_01"], // Achievement #8
["Land_Mil_ControlTower"], // Achievement #9
["Land_Church_03"] // Achievement #10
];
_buildingLimit = [ 1, 5, 10, 4, 3, 4, 8, 3, 3 ];
// 0 = Time Waster - have been playing for over _timeWasterValue second in a single session
if (dayz_playerAchievements select 0 < 1) then {
if (diag_ticktime - _timewasterCounter >= 3600) then {
_timewasterCounter = -1; // stop checking
dayz_playerAchievements set [0,1];
achievement = [0, player, dayz_characterID];
publicVariableServer "achievement";
};
};
// 1 = High Flyer - find yourself over 500m ATL
if (dayz_playerAchievements select 1 < 1) then {
if (visiblePosition player select 2 > 500) then {
dayz_playerAchievements set [1,1];
achievement = [1, player, dayz_characterID];
publicVariableServer "achievement";
};
};
// 2 = near mass grave
if (dayz_playerAchievements select 2 < 1) then {
_o = (visiblePositionASL player) nearestObject "Mass_grave";
if ((!isNull _o) and {(_o distance player < 3)}) then {
dayz_playerAchievements set [2,1];
achievement = [2, player, dayz_characterID];
publicVariableServer "achievement";
};
};
// 3-10 = Building checker - counts the number of unique buildings (of a certain type) you visit
_building = nearestBuilding visiblePositionASL player; // gives nearest enterable building within 50 meters
if(!isNull _building) then {
if (!(_building in _buildingList)) then {
_buildingType = typeOf _building;
if ((player distance _building < 0.5 * sizeof _buildingType) and {([player,_building] call fnc_isInsideBuilding)}) then {
_matchType = false;
{
if (_buildingType in _x) then {
_matchType = true;
_count = _buildingCounter select _forEachIndex;
_count = _count +1;
_buildingCounter set [_forEachIndex, _count ];
if ((_count >= _buildingLimit select _forEachIndex) and (dayz_playerAchievements select (_forEachIndex + 3) < 1)) then {
dayz_playerAchievements set [ _forEachIndex + 3, 1];
achievement = [_forEachIndex + 3, player, dayz_characterID];
publicVariableServer "achievement";
};
};
} forEach _buildingAchivement;
if (_matchType) then {
_buildingList set [ count _buildingList, _building ];
};
};
};
};
// 11 = LitterCount
if (dayz_playerAchievements select 11 < 1) then {
if (achievement_LitterCount == 5) then {
achievement_LitterCount = -1; //???
dayz_playerAchievements set [11,1];
achievement = [11, player, dayz_characterID];
publicVariableServer "achievement";
};
};
// 12 = ??????
// 13 = Gutting
if (dayz_playerAchievements select 13 < 1) then {
if (achievement_Gut) then {
dayz_playerAchievements set [13,1];
achievement = [13, player, dayz_characterID];
publicVariableServer "achievement";
};
};
[_timewasterCounter, _buildingList, _buildingCounter]
};

View File

@@ -1,18 +0,0 @@
#include "scheduler.hpp"
sched_humanityChange = {
HIDE_FSM_VARS
_startcombattimer = player getVariable["startcombattimer", 0];
//If player is not in combat and humanity differs from the last time it ran run humanityCheck(skin change check)
if (_startcombattimer == 0) then {
_playerHumanity = player getVariable ["humanity",0];
if ((_playerHumanity != playerHumanityCHK) and (vehicle player == player)) then {
[_playerHumanity] call player_humanityCheck;
playerHumanityCHK = _playerHumanity;
};
};
objNull
};

View File

@@ -11,7 +11,6 @@ call compile preprocessFileLineNumbers (_base+"sched_spawnCheck.sqf");
call compile preprocessFileLineNumbers (_base+"sched_playerActions.sqf");
call compile preprocessFileLineNumbers (_base+"sched_medical.sqf");
call compile preprocessFileLineNumbers (_base+"sched_gui.sqf");
//call compile preprocessFileLineNumbers (_base+"sched_achievement.sqf");
if (dayz_bleedingeffect != 2) then {
call compile preprocessFileLineNumbers (_base+"sched_bloodstains.sqf");
@@ -41,7 +40,6 @@ if (count _list == 0) then {
[ 6, 24.18, sched_spawnCheck ],
[ 1, 0.63, sched_throwable, sched_throwable_init ],
[ 1, 0.33, sched_medical, sched_medical_init ],
//[ 3, 2.70, sched_achievement, sched_achievement_init ],
[ 60, 10.44, sched_animals ],
[ 10, 5.44, sched_medical_slow ],
[ 60, 20.44, sched_newDay ],

View File

@@ -1,572 +0,0 @@
/*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Zombie Wild Agent">*/
/*%FSM<HEAD>*/
/*
item0[] = {"init",0,250,-325.000000,-275.000000,-225.000000,-225.000000,0.000000,"init"};
item1[] = {"End",1,250,175.000000,-275.000000,275.000000,-225.000000,0.000000,"End"};
item2[] = {"Not_Alive",4,218,50.000000,300.000000,150.000000,350.000000,5.000000,"Not" \n "Alive"};
item3[] = {"loiter",4,218,-325.000000,0.000000,-225.000000,50.000000,0.000000,"loiter"};
item4[] = {"Loiter",2,4346,-325.000000,125.000000,-225.000000,175.000000,0.000000,"Loiter"};
item5[] = {"",7,210,-29.000042,321.000000,-20.999960,329.000000,0.000000,""};
item6[] = {"true",8,218,-325.000000,-175.000000,-225.000000,-125.000000,0.000000,"true"};
item7[] = {"Begin",2,250,-325.000000,-100.000000,-225.000000,-50.000000,0.000000,"Begin"};
item8[] = {"Has_Target",4,218,-150.000000,225.000000,-50.000000,275.000000,1.000000,"Has" \n "Target"};
item9[] = {"Chase",2,250,-150.000000,300.000000,-50.000000,350.000000,0.000000,"Chase"};
item10[] = {"",7,210,-29.000006,146.000000,-20.999996,154.000000,0.000000,""};
item11[] = {"",7,210,-29.000006,196.000000,-20.999996,204.000000,0.000000,""};
item12[] = {"",7,210,-104.000000,196.000000,-95.999992,204.000000,0.000000,""};
item13[] = {"Time_Check",4,218,-250.000000,50.000000,-150.000000,100.000000,0.000000,"Time" \n "Check"};
item14[] = {"Time_Check",4,218,-275.000000,300.000000,-175.000000,350.000000,0.000000,"Time" \n "Check"};
item15[] = {"No_Target",4,218,-275.000000,375.000000,-175.000000,425.000000,3.000000,"No" \n "Target"};
item16[] = {"",7,210,-479.000000,396.000000,-471.000000,404.000000,0.000000,""};
item17[] = {"",7,210,-479.000000,146.000000,-471.000000,154.000000,0.000000,""};
item18[] = {"",7,210,221.000000,321.000000,229.000000,329.000000,0.000000,""};
item19[] = {"Cleanup_",2,250,175.000000,200.000000,275.000000,250.000000,0.000000,"Cleanup?"};
item20[] = {"",7,210,-104.000023,396.000000,-95.999992,404.000000,0.000000,""};
item21[] = {"cant_see",4,218,-275.000000,450.000000,-175.000000,500.000000,2.000000,"cant" \n "see"};
item22[] = {"Finish_Move",2,250,-275.000000,525.000000,-175.000000,575.000000,0.000000,"Finish" \n "Move"};
item23[] = {"finished",4,218,-400.000000,525.000000,-300.000000,575.000000,1.000000,"finished"};
item24[] = {"",7,210,-479.000000,546.000000,-471.000000,554.000000,0.000000,""};
item25[] = {"time_up",4,218,175.000000,-25.000000,275.000000,25.000000,0.000000,"time" \n "up"};
item26[] = {"",7,210,271.000000,96.000000,279.000000,104.000008,0.000000,""};
item27[] = {"",7,210,221.000000,96.000008,229.000000,103.999977,0.000000,""};
item28[] = {"",7,210,271.000000,-79.000000,279.000000,-71.000000,0.000000,""};
item29[] = {"",7,210,221.000000,-79.000000,229.000000,-71.000000,0.000000,""};
item30[] = {"too_long",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"too long"};
item31[] = {"",7,210,-229.000000,621.000000,-221.000000,629.000000,0.000000,""};
item32[] = {"",7,210,-479.000000,621.000000,-471.000000,629.000000,0.000000,""};
item33[] = {"Reset_Targeting",2,250,-525.000000,325.000000,-425.000000,375.000000,0.000000,"Reset" \n "Targeting"};
item34[] = {"true",8,218,-525.000000,200.000000,-425.000000,250.000000,0.000000,"true"};
item35[] = {"deleted",4,218,225.000000,0.000000,325.000000,50.000000,0.000000,"deleted"};
item36[] = {"",7,210,-104.000000,471.000000,-95.999992,479.000000,0.000000,""};
item37[] = {"moveToCompleted",4,218,-400.000000,50.000000,-300.000000,100.000000,1.000000,"moveToCompleted "};
item38[] = {"Failed_to_move",4,218,-550.000000,-75.000000,-450.000000,-25.000000,2.000000,"Failed to move"};
item39[] = {"Second_Hand",4,218,-200.000000,-275.000000,-100.000000,-225.000000,0.000000,"Second Hand"};
item40[] = {"End_1",1,250,-75.000000,-275.000000,25.000000,-225.000000,0.000000,"End"};
item41[] = {"",7,210,-4.000000,-79.000000,4.000000,-71.000000,0.000000,""};
item42[] = {"",7,210,-4.000000,146.000000,4.000000,154.000000,0.000000,""};
item43[] = {"isLocal",4,218,25.000000,125.000000,125.000000,175.000000,5.000000,"isLocal"};
item44[] = {"",7,210,71.000000,-254.000000,79.000000,-246.000000,0.000000,""};
item45[] = {"____FAKE____",9,1800,0.000000,0.000000,0.000000,0.000000,0.000000,"____FAKE____"};
link0[] = {0,6};
link1[] = {0,39};
link2[] = {2,18};
link3[] = {3,4};
link4[] = {4,10};
link5[] = {4,13};
link6[] = {4,37};
link7[] = {5,2};
link8[] = {6,7};
link9[] = {7,3};
link10[] = {7,41};
link11[] = {8,9};
link12[] = {9,5};
link13[] = {9,14};
link14[] = {9,20};
link15[] = {10,11};
link16[] = {10,42};
link17[] = {11,5};
link18[] = {11,12};
link19[] = {12,8};
link20[] = {13,4};
link21[] = {14,9};
link22[] = {15,16};
link23[] = {16,33};
link24[] = {17,4};
link25[] = {18,19};
link26[] = {19,27};
link27[] = {20,15};
link28[] = {20,36};
link29[] = {21,22};
link30[] = {22,23};
link31[] = {22,31};
link32[] = {23,24};
link33[] = {24,16};
link34[] = {25,29};
link35[] = {26,35};
link36[] = {27,25};
link37[] = {27,26};
link38[] = {28,29};
link39[] = {29,1};
link40[] = {30,32};
link41[] = {31,30};
link42[] = {32,24};
link43[] = {33,34};
link44[] = {34,17};
link45[] = {35,28};
link46[] = {36,21};
link47[] = {37,4};
link48[] = {39,40};
link49[] = {41,42};
link50[] = {42,43};
link51[] = {43,44};
link52[] = {44,40};
link53[] = {38,45};
link54[] = {45,38};
globals[] = {25.000000,1,0,0,0,640,480,1,128,6316128,1,-571.718994,323.614502,673.426392,-311.286346,581,1030,1};
window[] = {2,-1,-1,-1,-1,831,52,1260,52,3,599};
*//*%FSM</HEAD>*/
class FSM
{
fsmName = "DayZ Zombie Wild Agent";
class States
{
/*%FSM<STATE "init">*/
class init
{
name = "init";
init = /*%FSM<STATEINIT""">*/"_agent = _this select 0;" \n
"_position = _agent modelToWorld [0,0,0];" \n
"" \n
"_secondHand = false;" \n
"" \n
"" \n
"if (count _this > 1) then {" \n
" //_secondHand = true;" \n
" diag_log (""Second Hand Zombie Initialized: "" + str(_this));" \n
"};" \n
"" \n
"" \n
"diag_log (""Agent Initialized: "" + str(_this));"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "Second_Hand">*/
class Second_Hand
{
priority = 0.000000;
to="End_1";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"count _this > 1"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"diag_log (""Second Hand"");"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "true">*/
class true
{
priority = 0.000000;
to="Begin";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!(isNull _agent)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "End">*/
class End
{
name = "End";
init = /*%FSM<STATEINIT""">*/"if (!isNull _agent) then {" \n
" deleteVehicle _agent;" \n
"};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Loiter">*/
class Loiter
{
name = "Loiter";
init = /*%FSM<STATEINIT""">*/"_isAlive = alive _agent;" \n
"_isLocal = local _agent;" \n
"" \n
"_target = _agent call compile preprocessFileLineNumbers ""\z\addons\dayz_code\compile\zombie_findTargetAgent.sqf"";" \n
"" \n
"_agent moveTo _pos;" \n
"_agent forceSpeed 2;" \n
"" \n
"//if (_runonce) then {" \n
"// _agent moveTo _pos;" \n
"// _runonce = false;" \n
"//};" \n
"" \n
"_timeN = diag_tickTime;" \n
"" \n
"diag_log format [""Agent: %1, Distance: %2, Location: %3"",_agent,(_agent distance _pos),_pos];" \n
"" \n
"if (!_isLocal) then {" \n
"diag_log (""State ID: 6"");" \n
"diag_log (str(_pos));" \n
"diag_log (str(_this));" \n
"diag_log (str(_agent));" \n
"};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "Not_Alive">*/
class Not_Alive
{
priority = 5.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_isAlive"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "isLocal">*/
class isLocal
{
priority = 5.000000;
to="End_1";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_isLocal"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%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
"" \n
"if (!_hasMoved) then {" \n
" _agent setVariable[""doLoiter"",true,true];" \n
"};" \n
"_countr = 0;" \n
"_losCheck = 0;" \n
"_advLosCheck = 0;" \n
"_cantSee = false;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "moveToCompleted">*/
class moveToCompleted
{
priority = 1.000000;
to="Loiter";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"moveToCompleted _agent"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"//_pos = [_position,20,100,1,0,10,0] call BIS_fnc_findSafePos;" \n
"_pos = [_position,20,100,1] call fn_selectRandomLocation;" \n
"" \n
"" \n
"if (!_isLocal) then {" \n
"diag_log (""State ID: 49"");" \n
"};"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Time_Check">*/
class Time_Check
{
priority = 0.000000;
to="Loiter";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(diag_tickTime - _timeN) > 30"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_pos = [_position,20,100,1] call fn_selectRandomLocation;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Begin">*/
class Begin
{
name = "Begin";
init = /*%FSM<STATEINIT""">*/"//_doLoiter = _agent getVariable[""doLoiter"",true];" \n
"" \n
"_array = [];" \n
"" \n
"_isLocal = local _agent;" \n
"" \n
"_runonce = true;" \n
"" \n
"_bodyStay = 60;" \n
"" \n
"_hasMoved = true;" \n
"" \n
"_agent disableAI ""FSM"";" \n
"_newDest = getPosATL _agent;" \n
"_timeN = time;" \n
"_target = objNull;" \n
"_targetPos = [];" \n
"_countr = 0;" \n
"" \n
"//Spawn roaming script (individual to unit)" \n
"_entityTime = diag_tickTime;" \n
"_timeR = diag_tickTime;" \n
"" \n
"" \n
"diag_log (""State ID: 10"");" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "isLocal">*/
class isLocal
{
priority = 5.000000;
to="End_1";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_isLocal"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "loiter">*/
class loiter
{
priority = 0.000000;
to="Loiter";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_hasMoved"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"//_pos = [_position,20,100,1,0,10,0] call BIS_fnc_findSafePos;" \n
"_pos = [_position,20,100,1] call fn_selectRandomLocation;" \n
""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Chase">*/
class Chase
{
name = "Chase";
init = /*%FSM<STATEINIT""">*/"_timeN = diag_tickTime;" \n
"" \n
"if (speed _agent < 0.1) then {_countr = _countr + 1} else {_countr = 0};" \n
"_target = _agent call zombie_findTargetAgent;" \n
"_isAlive = alive _agent;" \n
"_targetPos = getPosATL _target;" \n
"" \n
"//Move to target" \n
"if (_agent distance _target > 2.2) then {" \n
" _agent moveTo _targetPos;" \n
" _agent forceSpeed 6;" \n
"};" \n
"" \n
"//Check if LOS" \n
"if (_losCheck == 5) then {" \n
" _losCheck = 0;" \n
" _cantSee = [_agent,_target] call dayz_losCheck;" \n
"};" \n
"" \n
"if (_cantSee) then {" \n
" _advLosCheck = _advLosCheck +1;" \n
"};" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "Not_Alive">*/
class Not_Alive
{
priority = 5.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_isAlive"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "No_Target">*/
class No_Target
{
priority = 3.000000;
to="Reset_Targeting";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(isNull _target)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "cant_see">*/
class cant_see
{
priority = 2.000000;
to="Finish_Move";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_advLosCheck > 5"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Time_Check">*/
class Time_Check
{
priority = 0.000000;
to="Chase";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(diag_tickTime - _timeN) > 1"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"// reset stance to favorite one" \n
"if (_agent distance _target > 5) then {" \n
" _agent setUnitPos (_agent getVariable [""stance"", ""UP""]);" \n
"};" \n
"" \n
"//LOS Tick" \n
"_losCheck = _losCheck + 1;" \n
"" \n
"if (_agent distance _target <= 2.2) then {" \n
" _dir = [_agent,_target] call BIS_Fnc_dirTo;" \n
" _agent setDir _dir;" \n
"" \n
"// _agentPos = getPosATL _agent;" \n
"// _agent moveTo _agentPos;" \n
" _agent forceSpeed 0;" \n
"" \n
" if (speed _agent == 0) then {" \n
" _losCheck = _losCheck + 1;" \n
" };" \n
"};" \n
"" \n
"if (_agent distance _target > 2.2 AND _agent distance _target < 5) then {" \n
" //Stand up" \n
" _agent setUnitPos ""UP"";" \n
"};"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Cleanup_">*/
class Cleanup_
{
name = "Cleanup_";
init = /*%FSM<STATEINIT""">*/"_waitStart = diag_tickTime;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "deleted">*/
class deleted
{
priority = 0.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"isNull _agent;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "time_up">*/
class time_up
{
priority = 0.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(diag_tickTime - _waitStart) > 300"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Finish_Move">*/
class Finish_Move
{
name = "Finish_Move";
init = /*%FSM<STATEINIT""">*/"_timeN = diag_tickTime;" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "finished">*/
class finished
{
priority = 1.000000;
to="Reset_Targeting";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_agent distance _targetPos < 3"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "too_long">*/
class too_long
{
priority = 0.000000;
to="Reset_Targeting";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(diag_tickTime - _timeN) > 10"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Reset_Targeting">*/
class Reset_Targeting
{
name = "Reset_Targeting";
init = /*%FSM<STATEINIT""">*/"// reset stance to favorite one" \n
"_agent setUnitPos (_agent getVariable [""stance"", ""UP""]);" \n
"" \n
"if (!isNull _target) then {" \n
" _targetPos = getPosATL _target;" \n
" _agent setVariable [""myDest"",_targetPos];" \n
" _agent moveTo _targetPos;" \n
"};" \n
"" \n
"//Local" \n
"_agent setVariable [""localtargets"",[],false];" \n
"" \n
"//Remote" \n
"_remotetargets = [];" \n
"_remotetargets = _agent getVariable [""remotetargets"",[]];" \n
"" \n
"//Clear remote on reset" \n
"if (count _remotetargets > 0) then" \n
"{" \n
" _agent setVariable [""remotetargets"",[],true];" \n
"};" \n
"" \n
"//Clear Target" \n
"_target = objNull;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "true">*/
class true
{
priority = 0.000000;
to="Loiter";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "End_1">*/
class End_1
{
name = "End_1";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/"diag_log (""End State"");"/*%FSM</STATEPRECONDITION""">*/;
class Links
{
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "____FAKE____">*/
class ____FAKE____
{
name = "____FAKE____";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "Failed_to_move">*/
class Failed_to_move
{
priority = 2.000000;
to="____FAKE____";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"moveToFailed _agent"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"//_pos = [_position,20,100,1,0,10,0] call BIS_fnc_findSafePos;" \n
"" \n
"if (!_isLocal) then {" \n
"diag_log (""State ID: 50"");" \n
"};"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
};
initState="init";
finalStates[] =
{
"End",
"End_1"
};
};
/*%FSM</COMPILE>*/