imago 1 Posted May 1, 2013 Zargabad Life on Arma 3 - Chaos Life v1.3 This is the next version of Chaos Life from Arma 2, running w/o any problems on Arma 3. To play the mission you must have the @chaoslife mod. The download is only 15MB or so. http://update.globalchaosgaming.net/ChaosLifeA3.exe Please see http://chaos.allowed.org for more information. Share this post Link to post Share on other sites
SG_Smokintodd 0 Posted May 2, 2013 I get an error when I run the .exe: Error - @chaos life mod in use! Please close Arma3 and try again. Using reg version of Arma (.56). Share this post Link to post Share on other sites
SG_Smokintodd 0 Posted May 2, 2013 After A3 loads, I get: Bad version, server rejected connection. Share this post Link to post Share on other sites
imago 1 Posted May 2, 2013 The server is indeed out of date. This will be corrected in the next few days I hope. Thank you! Share this post Link to post Share on other sites
imago 1 Posted May 14, 2013 (edited) I'm having trouble with A3 Fish AnimalTask. The editor fish swim fine. The dedicated server fish swim north then stop. Spent 3 days on this so far. Have repro steps I'm about to start lighting people up. i've had to make an addon like this: class CfgPatches { class GC_Animals { units[] = {"Snake_random_F_GC","Turtle_F_GC","CatShark_F_GC","Mullet_F_GC","Tuna_F_GC","Mackerel_F_GC","Salema_F_GC","Rabbit_F_GC"}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"A3_Animals_F_Snakes","A3_Animals_F_Fishes","A3_Animals_F_Turtle","A3_Animals_F_Rabbit"}; }; }; class CfgTasks { class AnimalMainTask_GC { name = "Chaos Animals"; fsm = "gc\global\GC_Animals.fsm"; condition = "gc\global\GC_createSingleTask.sqf"; description = "Animal master task modified by Global Chaos Gaming"; destination = ""; resources[] = {}; }; }; class CfgVehicles { class Rabbit_F; class Rabbit_F_GC: Rabbit_F { agentTasks[] = {"AnimalMainTask_GC"}; }; class Snake_random_F; class Snake_random_F_GC: Snake_random_F { agentTasks[] = {"AnimalMainTask_GC"}; }; class Turtle_F; class Turtle_F_GC: Turtle_F { agentTasks[] = {"AnimalMainTask_GC"}; }; class CatShark_F; class CatShark_F_GC: CatShark_F { agentTasks[] = {"AnimalMainTask_GC"}; }; class Mullet_F; class Mullet_F_GC: Mullet_F { agentTasks[] = {"AnimalMainTask_GC"}; }; class Tuna_F; class Tuna_F_GC: Tuna_F { agentTasks[] = {"AnimalMainTask_GC"}; }; class Mackerel_F; class Mackerel_F_GC: Mackerel_F { agentTasks[] = {"AnimalMainTask_GC"}; }; class Salema_F; class Salema_F_GC: Salema_F { agentTasks[] = {"AnimalMainTask_GC"}; }; }; i suppose because zargabad does not have water surface data. anyways my modified fsm just sets debug=true and a danger state once so the snakes and fish stick around. rabbits seemed fine from the get - go (yay!) /*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, GC Ambient Agent - Main">*/ /*%FSM<HEAD>*/ /* item0[] = {"_",-1,250,100.000000,-75.000000,250.000000,125.000000,0.000000,""}; item1[] = {"__1",-1,250,450.000000,-75.000000,600.000000,125.000000,0.000000,""}; item2[] = {"__2",-1,250,275.000000,-75.000000,425.000000,125.000000,0.000000,""}; item3[] = {"Init",0,4346,300.000000,-275.000000,400.000000,-225.000000,0.000000,"Init"}; item4[] = {"Desync",4,218,300.000000,-175.000000,400.000000,-125.000000,0.000000,"Desync"}; item5[] = {"Reset",2,250,-50.000000,-175.000000,50.000000,-125.000000,0.000000,"Reset"}; item6[] = {"Wait",4,218,-50.000000,-275.000000,50.000000,-225.000000,0.000000,"Wait"}; item7[] = {"Danger",4,218,475.000000,50.000000,575.000000,100.000000,1.000000,"Danger"}; item8[] = {"Danger",2,250,475.000000,-50.000000,575.000000,0.000000,0.000000,"Danger"}; item9[] = {"Safe",4,218,300.000000,50.000000,400.000000,100.000000,0.000000,"Safe"}; item10[] = {"Safe",2,250,300.000000,-50.000000,400.000000,0.000000,0.000000,"Safe"}; item11[] = {"Delay",4,218,-50.000000,175.000000,50.000000,225.000000,0.000000,"Delay"}; item12[] = {"Continue",2,250,300.000000,175.000000,400.000000,225.000000,0.000000,"Continue"}; item13[] = {"Formation",4,218,125.000000,50.000000,225.000000,100.000000,2.000000,"Formation"}; item14[] = {"Formation",2,250,125.000000,-50.000000,225.000000,0.000000,0.000000,"Formation"}; item15[] = {"Danger",4,218,-50.000000,250.000000,50.000000,300.000000,0.000000,"Danger"}; item16[] = {"Formation",4,218,-50.000000,325.000000,50.000000,375.000000,0.000000,"Formation"}; item17[] = {"Task_done",4,218,-50.000000,400.000000,50.000000,450.000000,0.000000,"Task done"}; item18[] = {"_",4,218,475.000000,-275.000000,575.000000,-225.000000,1.000000,""}; item19[] = {"__3",1,250,475.000000,-175.000000,575.000000,-125.000000,0.000000,""}; version=1; class LayoutItems { class Item0 { class ItemInfo { FontFace="Arial"; FontHeight=10; lWidth=5; lColor=16744448; }; BgColor=16766378; }; class Item1 { class ItemInfo { FontFace="Arial"; FontHeight=10; lWidth=5; lColor=255; }; BgColor=11184895; }; class Item2 { class ItemInfo { FontFace="Arial"; FontHeight=10; lWidth=5; lColor=65280; }; BgColor=11206570; }; }; link0[] = {3,4}; link1[] = {3,18}; link2[] = {4,5}; link3[] = {5,6}; link4[] = {5,11}; link5[] = {5,15}; link6[] = {5,16}; link7[] = {5,17}; link8[] = {6,5}; link9[] = {7,8}; link10[] = {8,4}; link11[] = {9,10}; link12[] = {10,4}; link13[] = {11,12}; link14[] = {12,7}; link15[] = {12,9}; link16[] = {12,13}; link17[] = {13,14}; link18[] = {14,4}; link19[] = {15,12}; link20[] = {16,12}; link21[] = {17,12}; link22[] = {18,19}; globals[] = {25.000000,1,0,1,16777215,640,480,1,17,6316128,1,-177.962433,530.478943,377.813202,-452.126251,793,929,1}; window[] = {2,-1,-1,-1,-1,840,110,1370,110,3,810}; *//*%FSM</HEAD>*/ class FSM { fsmName = "GC Ambient Agent - Main"; class States { /*%FSM<STATE "Init">*/ class Init { name = "Init"; init = /*%FSM<STATEINIT""">*/"_id = 0;" \n "_stateDanger = 0;" \n "_state = ""wait"";" \n "_movePos = getPos _agent;" \n "" \n "diag_log text ""GC Ambient AgentTask FSM started"";" \n "" \n "//------------------------------------------------------------------------------------------------------------" \n "//--- Set unique variables from config" \n "_type = typeof _agent;" \n "_root = configFile >> ""CfgVehicles"" >> _type;" \n "" \n "_config = _root >> ""VariablesScalar"";" \n "_n = (count _config) - 1;" \n "for ""_i"" from 0 to _n do" \n "{" \n " _entry = _config select _i;" \n " _name = configName _entry;" \n " _value = getNumber _entry;" \n " _agent setVariable [_name, _value];" \n "};" \n "" \n "_config = _root >> ""VariablesString"";" \n "_n = (count _config) - 1;" \n "for ""_i"" from 0 to _n do" \n "{" \n " _entry = _config select _i;" \n " _name = configName _entry;" \n " _value = getText _entry;" \n " _agent setVariable [_name, _value];" \n "};" \n "" \n "_scareLimit = _scareLimit - 0.001;" \n "_dangerLimit = _dangerLimit - 0.001;" \n "" \n "//------------------------------------------------------------------------------------------------------------" \n "//--- Get variables" \n "" \n "/*" \n " _threatMaxRadius = 20;" \n " _runDistanceMax = 50;" \n " _movePrefer = 0.7;" \n " _formationPrefer = 0.2;" \n " _scareLimit = 0.2;" \n " _dangerLimit = 1.0;" \n "" \n " _expSafe = ""(0.5 * meadow) * (0.5 * trees) * (1 - forest) * (1 - houses) * (1 - sea)"";" \n " _expDanger = ""(trees) * (forest) * (1 - meadow) * (1 - houses) * (1 - sea)"";" \n "*/" \n " _scareLimit = 15;" \n " _runDistanceMax = 20;" \n "_agent setvariable[""firstrun"",true];" \n "" \n "//------------------------------------------------------------------------------------------------------------" \n "//--- Debug mode" \n "_debug = false;" \n "_markers = [];" \n "if (_debug) then {" \n " _id = random 999999; //--- Generate (almost) unique number" \n " [_agent,_id] spawn {" \n " _agent = _this select 0;;" \n " _id =_this select 1;" \n " //--- Triangle" \n " _marker = createmarkerlocal [format [""bis_ambient_%1"",_id],position _agent];" \n " _marker setmarkertypelocal ""mil_triangle"";" \n " //--- Dot" \n " _dmarker = createmarkerlocal [format [""bis_ambient_%1_wp"",_id],position _agent];" \n " _dmarker setmarkertypelocal ""mil_dot"";" \n " _dmarker setmarkercolorlocal ""colorblack"";" \n " _dmarker setmarkersize [.5,.5];" \n " //--- Line" \n " _lmarker = createmarker [format [""bis_ambient_%1_line"",_id],position _agent];" \n " _lmarker setmarkershapelocal ""rectangle"";" \n " _lmarker setmarkerbrushlocal ""solid"";" \n " _lmarker setmarkercolorlocal ""colorblack"";" \n "" \n " while {alive _agent} do {" \n " _apos = position _agent;" \n " _bpos = expecteddestination _agent select 0;" \n "" \n " _marker setmarkerposlocal _apos;" \n " _marker setmarkerdirlocal direction _agent;" \n " //_marker setmarkertextlocal (_agent getvariable ""state"");" \n "" \n " if ([_bpos select 0,_bpos select 1] distance [0,0] > 10) then {" \n " _dmarker setmarkerposlocal _bpos;" \n "" \n " _difX = (_apos select 0) - (_bpos select 0) +0.1;" \n " _difY = (_apos select 1) - (_bpos select 1) +0.1;" \n " _lx = (_bpos select 0) + _difX / 2;" \n " _ly = (_bpos select 1) + _difY / 2;" \n " _dis = sqrt(_difX^2 + _difY^2);" \n " _dir = atan (_difX / _difY);" \n " _lmarker setmarkerposlocal [_lx,_ly];" \n " _lmarker setmarkersizelocal [0.5,_dis/2];" \n " _lmarker setmarkerdirlocal _dir;" \n " } else {" \n " _dmarker setmarkerposlocal [1,1,1];" \n " _lmarker setmarkerposlocal [1,1,1];" \n " };" \n "" \n " {" \n " _state = _agent getvariable ""state"";" \n " _color = ""colorgreen"";" \n " if (_state == ""danger"") then {_color = ""colorred""};" \n " if (_state == ""formation"") then {_color = ""colorblue""};" \n " _x setmarkercolorlocal _color;" \n " } foreach [_marker,_dmarker,_lmarker];" \n "" \n " sleep 0.1;" \n " };" \n " deletemarkerlocal _marker;" \n " };" \n "};" \n "" \n "" \n "" \n "" \n "//--- Delay" \n "_timeNow = time;" \n "_delay = random 1;"/*%FSM</STATEINIT""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; class Links { /*%FSM<LINK "_">*/ class _ { priority = 1.000000; to="__3"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"_agent isKindOf ""School_Salema"""/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Desync">*/ class Desync { priority = 0.000000; to="Reset"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ }; }; /*%FSM</STATE>*/ /*%FSM<STATE "Reset">*/ class Reset { name = "Reset"; init = /*%FSM<STATEINIT""">*/"//----- control position start -----" \n "" \n "_ctrlDepth = getTerrainHeightASL (getPos _agent);" \n "if ((_agent isKindOf ""Fish_Base_F"") || (_agent isKindOf ""Turtle_F"")) then {" \n " if (_ctrlDepth > -0.5) then {" \n " deleteVehicle _agent" \n " }" \n "} else {" \n " if (_ctrlDepth < -0.5) then {" \n " deleteVehicle _agent" \n " }" \n "};" \n "" \n "//----- control position end -----" \n "" \n "_stateDanger = 0;" \n "_targets = (_agent nearObjects _threatMaxRadius) - [_agent];" \n "" \n "_stateDangerList = [];" \n "_stateBigDangerList = [];" \n "{" \n " if (_x iskindof ""CAManBase"") then {" \n " _stateDangerList = _stateDangerList + [_x]" \n " } else {" \n " if ((_x iskindof ""Ship"" || _x iskindof ""LandVehicle"" || _x iskindof ""Air"") && isEngineOn _x) then {" \n " _a = 0;" \n " while {_a < 15} do {" \n " _stateDangerList = _stateDangerList + [_x];" \n " _a = _a + 1" \n " }" \n " }" \n " }" \n "} forEach _targets;" \n "_stateDanger = count _stateDangerList;" \n "" \n "_animals = [];" \n "_animalsScared = [];" \n "_stateFormation = 0;" \n "_stateScared = 0;" \n "" \n "{" \n " _type = _x;" \n " _object = _x;" \n "" \n " //--- Animal" \n " if (_type iskindof ""animal"" && !isnil {_object getvariable ""state""}) then {" \n " //--- Same type" \n " if (_type iskindof typeof _agent) then {" \n "" \n " //--- Formation leader" \n " if (!((_object getvariable ""state"") in [""formation"",""wait""]) && ((damage _object) < 0.1)) then {" \n " _animals = _animals + [_object]" \n " };" \n " };" \n " };" \n " " \n " if (_type iskindof ""animal"") then {" \n " //--- Scared" \n " if (!isnil {_object getvariable ""state""}) then {" \n " if ((_object getvariable ""state"") == ""danger"") then {" \n " _animalsScared = _animalsScared + [_object]" \n " };" \n " };" \n " if ((damage _object) > 0.1) then {" \n " _animalsScared = _animalsScared + [_object]" \n " };" \n " };" \n "" \n "} foreach _targets;" \n "_stateFormation = count _animals;" \n "_stateScared = count _animalsScared;" \n "" \n "_agent setvariable [""state"",_state];" \n "" \n "//hint format [""State: %3\nEnemies: %1\nScared animals: %2"",_stateDanger,_stateScared,_state];" \n "" \n "if (_agent getvariable ""firstrun"") then {" \n " _stateDanger = 15;" \n " _stateScared = 15;" \n " _agent setvariable[""firstrun"",false];" \n "};" \n "" \n "//--- Delay" \n "_timeNow = time;"/*%FSM</STATEINIT""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; class Links { /*%FSM<LINK "Delay">*/ class Delay { priority = 0.000000; to="Continue"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"(time - _timeNow) >= (_delay) //--- Delay" \n ""/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Danger">*/ class Danger { priority = 0.000000; to="Continue"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"(_state != ""danger"" && (_stateDanger > _dangerLimit || _stateScared > _scareLimit)) //--- Danger detected"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Formation">*/ class Formation { priority = 0.000000; to="Continue"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"(_state != ""formation"" && _state!= ""danger"" && _stateFormation > 0) //--- Formation detected"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Task_done">*/ class Task_done { priority = 0.000000; to="Continue"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"(_state != ""wait"" && ((_movePos distance _agent) < 3)) //--- Move task done"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Wait">*/ class Wait { priority = 0.000000; to="Reset"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"(time - _timeNow) >= 2;"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ }; }; /*%FSM</STATE>*/ /*%FSM<STATE "Danger">*/ class Danger { name = "Danger"; init = /*%FSM<STATEINIT""">*/"//--- Find place to hide" \n "_state = ""danger"";" \n "_tries = if (_debug) then {10} else {3};" \n "_movePosList = selectbestplaces [position _agent,_runDistanceMax,_expDanger,10,_tries];" \n "" \n "//---Enemy position" \n "_closeEnemy = _agent;" \n "if ((count _stateDangerList) != 0) then {" \n " _closeEnemy = _stateDangerList select 0;" \n "} else {" \n " if ((count _animalsScared) != 0) then {" \n " _closeEnemy = _animalsScared select 0;" \n " } else {" \n " _closeEnemy = _agent;" \n " };" \n "};" \n "" \n "{if ((_agent distance _x) < (_agent distance _closeEnemy)) then {_closeEnemy = _x}} forEach _stateDangerList;" \n "_pos1 = getpos _agent;" \n "_pos2 = getpos _closeEnemy;" \n "_ret = ((_pos2 select 0) - (_pos1 select 0)) atan2 ((_pos2 select 1) - (_pos1 select 1));" \n "_ret = abs (_ret % 360);" \n "" \n "//---movePos" \n "if ((count _movePosList) != 0) then {" \n " _movePos = [0,0];" \n " if ((_agent isKindOf ""Fish_Base_F"") || (_agent isKindOf ""Turtle_F"")) then {" \n " _dest = getPosASL _agent;" \n " if ((_dest select 2) > -1) then {" \n " _agent setPos [_dest select 0, _dest select 1, -3]" \n " };" \n " if (({(getTerrainHeightASL (_x select 0)) < -2} count _movePosList) > 0) then {" \n " _depth = 0;" \n "" \n " if ((count _movePosList) > 2) then {" \n " if (_ret > 180) then {_ret = 360 - _ret};" \n " _i = 0;" \n " {" \n " _pos1 = getpos _agent;" \n " _pos2 = _x select 0;" \n " _retNew = ((_pos2 select 0) - (_pos1 select 0)) atan2 ((_pos2 select 1) - (_pos1 select 1));" \n " _retNew = abs (_retNew % 360);" \n " _angle = _ret + _retNew;" \n " if (_angle > 180) then {_angle = 360 - _angle};" \n " if (_angle > _i) then {_i = _angle;_movePos = _x select 0};" \n " } forEach _movePosList;" \n " } else {" \n " _movePos = (_movePosList select (floor random (count _movePosList))) select 0;" \n " };" \n "" \n " _depth = getTerrainHeightASL _movePos;" \n " while {_depth > -2} do {" \n " _movePos = (_movePosList select (floor random (count _movePosList))) select 0;" \n " _depth = getTerrainHeightASL _movePos;" \n " };" \n " _agentDepth = (position _agent) select 2;" \n " _movePos = [_movePos select 0, _movePos select 1, (_agentDepth-3)+(random 6)];" \n " _agent moveto _movePos;" \n " };" \n " } else {" \n " if ((count _movePosList) > 2) then {" \n " if (_ret > 180) then {_ret = 360 - _ret};" \n " _i = 0;" \n " {" \n " _pos1 = getpos _agent;" \n " _pos2 = _x select 0;" \n " _retNew = ((_pos2 select 0) - (_pos1 select 0)) atan2 ((_pos2 select 1) - (_pos1 select 1));" \n " _retNew = abs (_retNew % 360);" \n " _angle = _ret + _retNew;" \n " if (_angle > 180) then {_angle = 360 - _angle};" \n " if (_angle > _i) then {_i = _angle;_movePos = _x select 0};" \n " } forEach _movePosList;" \n " } else {" \n " _movePos = (_movePosList select (floor random (count _movePosList))) select 0;" \n " };" \n "" \n " _water = surfaceIsWater _movePos;" \n " while {_water} do {" \n " _movePos = (_movePosList select (floor random (count _movePosList))) select 0;" \n " _water = surfaceIsWater _movePos;" \n " };" \n "" \n " _agent moveto _movePos;" \n " };" \n "};" \n "" \n "if (isNil ""_movepos"") then {" \n " _movePos = getPos _agent;" \n "};" \n "" \n "if (_debug) then {" \n " {" \n " _dmarker = createmarkerlocal [format [""xxx%1"",round random 99999],_x select 0];" \n " _dmarker setmarkertypelocal ""mil_dot"";" \n " _dmarker setmarkercolorlocal ""colorgreen"";" \n " _dmarker setmarkeralphalocal 0.05;" \n " _size = 1 + random 1;" \n " _dmarker setmarkersizelocal [_size,_size];" \n " } foreach _movePosList;" \n "};" \n "" \n "//--- Delay" \n "if ((count _movePosList) != 0) then {" \n " _timeNow = time;" \n " _delay = 10 + random 10;" \n "} else {" \n " _timeNow = time;" \n " _delay = 1 + random 1;" \n "};"/*%FSM</STATEINIT""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; class Links { /*%FSM<LINK "Desync">*/ class Desync { priority = 0.000000; to="Reset"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ }; }; /*%FSM</STATE>*/ /*%FSM<STATE "Safe">*/ class Safe { name = "Safe"; init = /*%FSM<STATEINIT""">*/"{deletemarkerlocal _x} foreach _markers;" \n "" \n "//--- Move or wait" \n "_state = ""wait"";" \n "_ran = random 1;" \n "if (_ran <= _movePrefer) then {" \n " _state = ""move"";" \n " _movePosList = selectbestplaces [position _agent,_runDistanceMax,_expSafe,10,1];" \n " if ((count _movePosList) != 0) then {" \n " if ((_agent isKindOf ""Fish_Base_F"") || (_agent isKindOf ""Turtle_F"")) then {" \n " _dest = getPosASL _agent;" \n " if ((_dest select 2) > -1) then {" \n " _agent setPos [_dest select 0, _dest select 1, -3]" \n " };" \n " if (({(getTerrainHeightASL (_x select 0)) < -2} count _movePosList) > 0) then {" \n " _depth = 0;" \n " _movePos = (_movePosList select (floor random (count _movePosList))) select 0;" \n " _depth = getTerrainHeightASL _movePos;" \n " while {_depth > -2} do {" \n " _movePos = (_movePosList select (floor random (count _movePosList))) select 0;" \n " _depth = getTerrainHeightASL _movePos;" \n " };" \n " _agentDepth = (position _agent) select 2;" \n " _movePos = [_movePos select 0, _movePos select 1, (_agentDepth-1.5)+(random 3)];" \n " _agent moveto _movePos;" \n " };" \n " } else {" \n " _j = 0;" \n " _movePos = (_movePosList select (floor random (count _movePosList))) select 0;" \n "" \n " _water = surfaceIsWater _movePos;" \n " while {_water} do {" \n " _movePos = (_movePosList select (floor random (count _movePosList))) select 0;" \n " _water = surfaceIsWater _movePos;" \n " };" \n " _agent moveto _movePos;" \n " };" \n "};" \n "" \n "if (isNil ""_movepos"") then {" \n " _movePos = getPos _agent;" \n "};" \n "" \n "//--- Delay" \n "_timeNow = time;" \n "_delay = 10 + random 10;"/*%FSM</STATEINIT""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; class Links { /*%FSM<LINK "Desync">*/ class Desync { priority = 0.000000; to="Reset"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ }; }; /*%FSM</STATE>*/ /*%FSM<STATE "Continue">*/ class Continue { name = "Continue"; init = /*%FSM<STATEINIT""">*/"if (_debug) then {{deletemarkerlocal _x} foreach _markers};"/*%FSM</STATEINIT""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; class Links { /*%FSM<LINK "Formation">*/ class Formation { priority = 2.000000; to="Formation"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"_stateFormation > 0;"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Danger">*/ class Danger { priority = 1.000000; to="Danger"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"(_stateDanger > _dangerLimit) || (_stateScared > _scareLimit)"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Safe">*/ class Safe { priority = 0.000000; to="Safe"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"(_stateDanger < _dangerLimit) && (_stateScared < _scareLimit)"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ }; }; /*%FSM</STATE>*/ /*%FSM<STATE "Formation">*/ class Formation { name = "Formation"; init = /*%FSM<STATEINIT""">*/"_state = ""formation"";" \n "_formLeader = _animals select 0;" \n "_moveposNew = (expecteddestination _formLeader select 0);" \n "if (isNil ""_moveposNew"") then {" \n " _leaderPos = getPos _formLeader;" \n " _movePos = [(_leaderPos select 0)+(-5 + random 10),(_leaderPos select 1)+(-5 + random 10),0];" \n " _agent moveto _movePos;" \n "};" \n "" \n "" \n "//--- Delay" \n "_timeNow = time;" \n "_delay = 10 + random 10;"/*%FSM</STATEINIT""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; class Links { /*%FSM<LINK "Desync">*/ class Desync { priority = 0.000000; to="Reset"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ }; }; /*%FSM</STATE>*/ /*%FSM<STATE "__3">*/ class __3 { name = "__3"; init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; class Links { }; }; /*%FSM</STATE>*/ }; initState="Init"; finalStates[] = { "__3", }; }; /*%FSM</COMPILE>*/ also my RPT is exploding to hundreds of megs with animals as described here: http://feedback.arma3.com/view.php?id=5897 Edited May 14, 2013 by Imago Share this post Link to post Share on other sites