cameroon 12 Posted March 8, 2014 Yeah, I've wondered more than once what it would take to get some better road finding working and maybe UPS for the infantry spawns. No insult to EOS though! I love this script and use it extensively. It's just sad that BIS, with all the time and money that they've invested in the Arma series, still can't get an AI vehicle to follow a road. I'd be happy if drivers just understood the dimensions of their vehicles better. I feel like they path-find based on the driver's position and what the driver could path around/through. Share this post Link to post Share on other sites
mech79 10 Posted March 8, 2014 Can I get Ai to set off this script? Seemed to work in your mission, but when I added it to mine it isnt working right. Share this post Link to post Share on other sites
-ami- mofo 13 Posted March 9, 2014 Two new questions about this... 1) Is it possible to alter the behaviour of the spawned patrolling AI? ie have them go into combat mode or something after spawn rather than just casually walking around. 2) I notice that there's a 'damage handler' setting which I've turned up so the AI die a bit easier. Does that work by increasing bullet damage? or does it reduce the health of the enemy AI? I'm actually after a way to increase bullet damage of players so in general about 2 bullets will kill. Don't want to do it by turning AI health down though. Is there a setting that could go in the init file to do this? (but only for players!) Thanks. Share this post Link to post Share on other sites
cameroon 12 Posted March 9, 2014 Can I get Ai to set off this script? Seemed to work in your mission, but when I added it to mine it isnt working right. Hi Mech, do you mean make the AI cause the zone(s) to activate? They can't, it's only the player that causes zone to activate. If you mean in the demo mission I posted of doing EOS zones that are created by scripts rather than the editor, I created some prestaged "events" that make it look like something was going on before you got there. The actual EOS units still spawn only when the player gets close enough. Depending on what kind of effect you're after, you could also set your zone to be active from further away so that the AI is doing things well in advance of when the player(s) get there. ---------- Post added at 16:07 ---------- Previous post was at 16:01 ---------- Two new questions about this...1) Is it possible to alter the behaviour of the spawned patrolling AI? ie have them go into combat mode or something after spawn rather than just casually walking around. 2) I notice that there's a 'damage handler' setting which I've turned up so the AI die a bit easier. Does that work by increasing bullet damage? or does it reduce the health of the enemy AI? I'm actually after a way to increase bullet damage of players so in general about 2 bullets will kill. Don't want to do it by turning AI health down though. Is there a setting that could go in the init file to do this? (but only for players!) Thanks. Pretty sure that if you want to modify how players are damaged, you'll need to use event handlers (HandleDamage in particular https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage). If you have any kind of respawn available, you'll also need to have a mechanism to add your event handler on respawn. Share this post Link to post Share on other sites
Kabs 10 Posted March 11, 2014 (edited) i am looking for a way to completely disable unit despawn once spawned. and dont let anymore units spawn other than the units allready spawned. Edited March 11, 2014 by Kabs Share this post Link to post Share on other sites
meatball 25 Posted March 12, 2014 Hmm, question to everyone. Has anyone discovered a way to stop vehicles from despawning if hijacked by players? Basically if EoS spawns AI with a vehicle, and the players either disable the drivers/passengers or the drivers/passengers abandon the vehicle and the players hop in, the vehicle will still despawn (even if the players are currently driving it) when the players move out of the original spawn range for that zone. Doesn't happen often, but happens enough that it throws things off. Even had a few players die when driving 70 kph and their vehicle despawned out from under them... Share this post Link to post Share on other sites
StaticDET5 1 Posted March 12, 2014 I don't think this is limited to EOS. I'm having the same issue with the Wasteland Mod. I'd love to see a system that automatically "saves" any vehicle that players have gotten into that is above a certain level of damage (Set that variable as needed). Share this post Link to post Share on other sites
meatball 25 Posted March 12, 2014 Agreed, I've seen the same thing with AI Spawn Script Pack as well. While it's definitely not limited to EoS, it's still an issue that would need to be addressed by that script itself. When most of these scripts create/cache AI and vehicles they use an array to track the unit names at spawn so it can then reference the same name at despawn. Problem is, if a player swipes a vehicle, that vehicle is still sitting in the array of 'spawned' AI vehicles and nothing ever tells it to remove that vehicle from the array. So, when despawn happens, the vehicle goes with it. So, while I know what's going on, every script/mod stores the AI/vehicles in different places/arrays, so there's no way that I can think of to write a script that would fix the issue across the board. So, unless it's built into the script to (1) recognize that the players actually got into one of the spawned vehicles, and (2) pull that vehicle out of the scripts arrays so it doesn't get despawned, it'll be a problem :) I would think it could be addressed by just a couple of lines of code, but it's a matter of where to put that code, and what variables/arrays need to be referenced for that specific script. Share this post Link to post Share on other sites
bangabob 37 Posted March 12, 2014 Agreed, I've seen the same thing with AI Spawn Script Pack as well. While it's definitely not limited to EoS, it's still an issue that would need to be addressed by that script itself. When most of these scripts create/cache AI and vehicles they use an array to track the unit names at spawn so it can then reference the same name at despawn. Problem is, if a player swipes a vehicle, that vehicle is still sitting in the array of 'spawned' AI vehicles and nothing ever tells it to remove that vehicle from the array. So, when despawn happens, the vehicle goes with it.So, while I know what's going on, every script/mod stores the AI/vehicles in different places/arrays, so there's no way that I can think of to write a script that would fix the issue across the board. So, unless it's built into the script to (1) recognize that the players actually got into one of the spawned vehicles, and (2) pull that vehicle out of the scripts arrays so it doesn't get despawned, it'll be a problem :) I would think it could be addressed by just a couple of lines of code, but it's a matter of where to put that code, and what variables/arrays need to be referenced for that specific script. This is resolved in 'non-dedicated' environment. However it remains an issue on dedicated servers. I will look into it when i get the time. Share this post Link to post Share on other sites
meatball 25 Posted March 12, 2014 Awesome! Thanks Banga, and thanks for the great script! Share this post Link to post Share on other sites
chondo999 1 Posted March 12, 2014 Does EOS work well with bCombat or ASR AI? Share this post Link to post Share on other sites
StaticDET5 1 Posted March 13, 2014 This is resolved in 'non-dedicated' environment. However it remains an issue on dedicated servers. I will look into it when i get the time. Banga, when you do fix it, could you post some detail on the fix? Many others are having problems with this. Share this post Link to post Share on other sites
holo89 10 Posted March 14, 2014 Hi Bangabob, I wanted to bring you a modification I made that puts a delay before despawn. (_despawnDelay = 60; // sec. for this example) I needed that so it does not despawn and respawn when I die due to "respawn script". And 60 sec. allows me to respawn at base, take some ammo and Halo back to where I was, and units are at the same place that they were (or almost) when I died. I took version 1.98. only the eos_core.sqf is modified. (Not looked at bastillon yet) check the lines 29, 46, 47, 50, 199, 200 of this modified script. Basically it does set a variable "LastDeact" on the trigger _eosActivated in the DeAct statement of the trigger. It puts the "time" there and I added a condition in the "despawn" condition that-> time - "LastDeact" would be greater than _despawnDelay. eos_core.sqf if (!isServer) exitWith {}; private ["_newpos","_cargoType","_vehType","_dGrp","_mkrAgl","_side","_bGroup","_civZone","_fGrp","_fSize","_fGrps","_eGrp","_eGrps","_dGrps","_aMin","_aSize","_aGrps","_aGrp","_bMin","_units","_bSize","_bGrps","_bGrp","_trig","_cache","_grp","_crew","_vehicle","_actCond","_mAN","_mAH","_distance","_mA","_settings","_cGrp","_cSize","_cGrps","_taken","_clear","_enemyFaction","_faction","_n","_eosAct","_eosActivated","_debug","_mkr","_mPos","_mkrX","_mkrY"]; _mkr=(_this select 0);_mPos=markerpos(_this select 0); _mkrX=getMarkerSize _mkr select 0; _mkrY=getMarkerSize _mkr select 1; _mkrAgl=markerDir _mkr; _a=(_this select 1);_aGrps=_a select 0;_aSize=_a select 1;_aMin=_aSize select 0; _b=(_this select 2);_bGrps=_b select 0;_bSize=_b select 1;_bMin=_bSize select 0; _c=(_this select 3);_cGrps=_c select 0;_cSize=_c select 1; _d=(_this select 4);_dGrps=_d select 0;_eGrps=_d select 1;_fGrps=_d select 2;_fSize=_d select 3; _settings=(_this select 5);_faction=_settings select 0;_mA=_settings select 1;_distance=_settings select 2;_side=_settings select 3; _heightLimit=if (count _settings > 4) then {_settings select 4} else {false}; _debug=if (count _settings > 5) then {_settings select 5} else {false}; _cache= if (count _this > 6) then {_this select 6} else {false}; if (_side==EAST) then {_enemyFaction="east";_civZone=false;}; if (_side==WEST) then {_enemyFaction="west";_civZone=false;}; if (_side==INDEPENDENT) then {_enemyFaction="GUER";_civZone=false;}; if (_side==CIVILIAN) then {_enemyFaction="civ";_civZone=true;}; if (_mA==0) then {_mAH = 1;_mAN = 0.5;}; if (_mA==1) then {_mAH = 0;_mAN = 0;}; if (_mA==2) then {_mAH = 0.5;_mAN = 0.5;}; // INITIATE ZONE _trig=format ["EOSTrigger%1",_mkr]; _despawnDelay = 60; //Sec. if (!_cache) then { if ismultiplayer then { if (_heightLimit) then {_actCond="{vehicle _x in thisList && isplayer _x && ((getPosATL _x) select 2) < 5} count playableunits > 0"; }else {_actCond="{vehicle _x in thisList && isplayer _x} count playableunits > 0"; };}else{ if (_heightLimit) then {_actCond="{vehicle _x in thisList && isplayer _x && ((getPosATL _x) select 2) < 5} count allUnits > 0"; }else {_actCond="{vehicle _x in thisList && isplayer _x} count allUnits > 0";};}; _eosActivated = createTrigger ["EmptyDetector",_mPos]; _eosActivated setTriggerArea [(_distance+_mkrX),(_distance+_mkrY),_mkrAgl,FALSE]; _eosActivated setTriggerActivation ["ANY","PRESENT",true]; _eosActivated setTriggerTimeout [1, 1, 1, true]; //_eosActivated setTriggerStatements [_actCond,"",""]; _eosActivated setTriggerStatements [_actCond,"",format["(server getVariable '%1') setVariable ['LastDeact',time];",_trig]]; server setvariable [_trig,_eosActivated]; _eosActivated setVariable ['LastDeact',0]; }else{ _eosActivated=server getvariable _trig; }; _mkr setmarkerAlpha _mAN; if (!(getmarkercolor _mkr == VictoryColor)) then //IF MARKER IS GREEN DO NOT CHANGE COLOUR { _mkr setmarkercolor hostileColor; }; waituntil {triggeractivated _eosActivated}; //WAIT UNTIL PLAYERS IN ZONE if (!(getmarkercolor _mkr == "colorblack"))then { if (!(getmarkercolor _mkr == VictoryColor)) then {_mkr setmarkerAlpha _mAH;}; // SPAWN HOUSE PATROLS for "_counter" from 1 to _aGrps do { if (isnil "_aGrp") then {_aGrp=[];}; if (_cache) then { _cacheGrp=format ["HP%1",_counter]; _units=_eosActivated getvariable _cacheGrp; _aSize=[_units,_units]; _aMin=_aSize select 0; if (_debug)then{player sidechat format ["ID:%1,restore - %2",_cacheGrp,_units];}; }; if (_aMin > 0) then { _aGroup=[_mPos,_aSize,_faction,_side] call EOS_fnc_spawngroup; if (!surfaceiswater _mPos) then { 0=[_mPos,units _aGroup,_mkrX,0,[0,20],true,true] call shk_fnc_fillhouse; }else{ 0 = [_aGroup,_mkr] call EOS_fnc_taskpatrol; }; _aGrp set [count _aGrp,_aGroup]; 0=[_aGroup,"INFskill"] call eos_fnc_grouphandlers; if (_debug) then {PLAYER SIDECHAT (format ["Spawned House Patrol: %1",_counter]);0= [_mkr,_counter,"House Patrol",getpos (leader _aGroup)] call EOS_debug}; }; }; // SPAWN PATROLS for "_counter" from 1 to _bGrps do { if (isnil "_bGrp") then {_bGrp=[];}; if (_cache) then { _cacheGrp=format ["PA%1",_counter]; _units=_eosActivated getvariable _cacheGrp; _bSize=[_units,_units]; _bMin=_bSize select 0; if (_debug)then{player sidechat format ["ID:%1,restore - %2",_cacheGrp,_units];}; }; if (_bMin > 0) then { _pos = [_mkr,true] call SHK_pos; _bGroup=[_pos,_bSize,_faction,_side] call EOS_fnc_spawngroup; 0 = [_bGroup,_mkr] call EOS_fnc_taskpatrol; _bGrp set [count _bGrp,_bGroup]; 0=[_bGroup,"INFskill"] call eos_fnc_grouphandlers; if (_debug) then {PLAYER SIDECHAT (format ["Spawned Patrol: %1",_counter]);0= [_mkr,_counter,"patrol",getpos (leader _bGroup)] call EOS_debug}; }; }; //SPAWN LIGHT VEHICLES for "_counter" from 1 to _cGrps do { if (isnil "_cGrp") then {_cGrp=[];}; _newpos=[_mkr,50] call EOS_fnc_findSafePos; if (surfaceiswater _newpos) then {_vehType=8;_cargoType=10;}else{_vehType=7;_cargoType=9;}; _cGroup=[_newpos,_side,_faction,_vehType]call EOS_fnc_spawnvehicle; if ((_cSize select 0) > 0) then{ 0=[(_cGroup select 0),_cSize,(_cGroup select 2),_faction,_cargoType] call eos_fnc_setcargo; }; 0=[(_cGroup select 2),"LIGskill"] call eos_fnc_grouphandlers; 0 = [(_cGroup select 2),_mkr] call EOS_fnc_taskpatrol; _cGrp set [count _cGrp,_cGroup]; if (_debug) then {player sidechat format ["Light Vehicle:%1 - r%2",_counter,_cGrps];0= [_mkr,_counter,"Light Veh",(getpos leader (_cGroup select 2))] call EOS_debug}; }; //SPAWN ARMOURED VEHICLES for "_counter" from 1 to _dGrps do { if (isnil "_dGrp") then {_dGrp=[];}; _newpos=[_mkr,50] call EOS_fnc_findSafePos; if (surfaceiswater _newpos) then {_vehType=8;}else{_vehType=2;}; _dGroup=[_newpos,_side,_faction,_vehType]call EOS_fnc_spawnvehicle; 0=[(_dGroup select 2),"ARMskill"] call eos_fnc_grouphandlers; 0 = [(_dGroup select 2),_mkr] call EOS_fnc_taskpatrol; _dGrp set [count _dGrp,_dGroup]; if (_debug) then {player sidechat format ["Armoured:%1 - r%2",_counter,_dGrps];0= [_mkr,_counter,"Armour",(getpos leader (_dGroup select 2))] call EOS_debug}; }; //SPAWN STATIC PLACEMENTS for "_counter" from 1 to _eGrps do { if (surfaceiswater _mPos) exitwith {}; if (isnil "_eGrp") then {_eGrp=[];}; _newpos=[_mkr,50] call EOS_fnc_findSafePos; _eGroup=[_newpos,_side,_faction,5]call EOS_fnc_spawnvehicle; 0=[(_eGroup select 2),"STAskill"] call eos_fnc_grouphandlers; _eGrp set [count _eGrp,_eGroup]; if (_debug) then {player sidechat format ["Static:%1",_counter];0= [_mkr,_counter,"Static",(getpos leader (_eGroup select 2))] call EOS_debug}; }; //SPAWN CHOPPER for "_counter" from 1 to _fGrps do { if (isnil "_fGrp") then {_fGrp=[];}; if ((_fSize select 0) > 0) then {_vehType=4}else{_vehType=3}; _newpos = [(markerpos _mkr), 1500, random 360] call BIS_fnc_relPos; _fGroup=[_newpos,_side,_faction,_vehType,"fly"]call EOS_fnc_spawnvehicle; _fGrp set [count _fGrp,_fGroup]; if ((_fSize select 0) > 0) then { _cargoGrp = createGroup _side; 0=[(_fGroup select 0),_fSize,_cargoGrp,_faction,9] call eos_fnc_setcargo; 0=[_cargoGrp,"INFskill"] call eos_fnc_grouphandlers; _fGroup set [count _fGroup,_cargoGrp]; null = [_mkr,_fGroup,_counter] execvm "eos\functions\TransportUnload_fnc.sqf"; }else{ _wp1 = (_fGroup select 2) addWaypoint [(markerpos _mkr), 0]; _wp1 setWaypointSpeed "FULL"; _wp1 setWaypointType "SAD";}; 0=[(_fGroup select 2),"AIRskill"] call eos_fnc_grouphandlers; if (_debug) then {player sidechat format ["Chopper:%1",_counter];0= [_mkr,_counter,"Chopper",(getpos leader (_fGroup select 2))] call EOS_debug}; }; //SPAWN ALT TRIGGERS _clear = createTrigger ["EmptyDetector",_mPos]; _clear setTriggerArea [_mkrX,_mkrY,_mkrAgl,FALSE]; _clear setTriggerActivation [_enemyFaction,"NOT PRESENT",true]; _clear setTriggerStatements ["this","",""]; _taken = createTrigger ["EmptyDetector",_mPos]; _taken setTriggerArea [_mkrX,_mkrY,_mkrAgl,FALSE]; _taken setTriggerActivation ["ANY","PRESENT",true]; _taken setTriggerStatements ["{vehicle _x in thisList && isplayer _x && ((getPosATL _x) select 2) < 5} count allUnits > 0","",""]; _eosAct=true; while {_eosAct} do { // IF PLAYER LEAVES THE AREA OR ZONE DEACTIVATED //if (!triggeractivated _eosActivated || getmarkercolor _mkr == "colorblack") exitwith if (((!triggeractivated _eosActivated) && (time - (_eosActivated getVariable "LastDeact") > _despawnDelay)) || getmarkercolor _mkr == "colorblack") exitwith { if (_debug) then {if (!(getmarkercolor _mkr == "colorblack")) then {hint "Restarting Zone AND deleting units";}else{hint "EOS zone deactivated";};}; //CACHE LIGHT VEHICLES if (!isnil "_cGrp") then { { _vehicle = _x select 0;_crew = _x select 1;_grp = _x select 2; if (!alive _vehicle || {!alive _x} foreach _crew) then { _cGrps= _cGrps - 1;}; {deleteVehicle _x} forEach (_crew); if (!(vehicle player == _vehicle)) then {{deleteVehicle _x} forEach[_vehicle];}; {deleteVehicle _x} foreach units _grp;deleteGroup _grp; }foreach _cGrp; if (_debug) then {player sidechat format ["ID:c%1",_cGrps];};}; // CACHE ARMOURED VEHICLES if (!isnil "_dGrp") then { { _vehicle = _x select 0;_crew = _x select 1;_grp = _x select 2; if (!alive _vehicle || {!alive _x} foreach _crew) then {_dGrps= _dGrps - 1;}; {deleteVehicle _x} forEach (_crew); if (!(vehicle player == _vehicle)) then {{deleteVehicle _x} forEach[_vehicle];}; {deleteVehicle _x} foreach units _grp;deleteGroup _grp; }foreach _dGrp; if (_debug) then {player sidechat format ["ID:c%1",_dGrps];};}; // CACHE PATROL INFANTRY if (!isnil "_bGrp") then { _n=0; { _n=_n+1;_units={alive _x} count units _x;_cacheGrp=format ["PA%1",_n]; if (_debug) then{player sidechat format ["ID:%1,cache - %2",_cacheGrp,_units];}; _eosActivated setvariable [_cacheGrp,_units]; {deleteVehicle _x} foreach units _x;deleteGroup _x; }foreach _bGrp; }; // CACHE HOUSE INFANTRY if (!isnil "_aGrp") then { _n=0; { _n=_n+1;_units={alive _x} count units _x;_cacheGrp=format ["HP%1",_n]; if (_debug) then{player sidechat format ["ID:%1,cache - %2",_cacheGrp,_units];}; _eosActivated setvariable [_cacheGrp,_units]; {deleteVehicle _x} foreach units _x;deleteGroup _x; }foreach _aGrp; }; // CACHE MORTARS if (!isnil "_eGrp") then { { _vehicle = _x select 0;_crew = _x select 1;_grp = _x select 2; if (!alive _vehicle || {!alive _x} foreach _crew) then {_eGrps= _eGrps - 1;}; {deleteVehicle _x} forEach (_crew); if (!(vehicle player == _vehicle)) then {{deleteVehicle _x} forEach[_vehicle];}; {deleteVehicle _x} foreach units _grp;deleteGroup _grp; }foreach _eGrp;}; // CACHE HELICOPTER TRANSPORT if (!isnil "_fGrp") then { { _vehicle = _x select 0;_crew = _x select 1;_grp = _x select 2; _cargoGrp = _x select 3; if (!alive _vehicle || {!alive _x} foreach _crew) then {_fGrps= _fGrps - 1;}; {deleteVehicle _x} forEach (_crew); if (!(vehicle player == _vehicle)) then {{deleteVehicle _x} forEach[_vehicle];}; {deleteVehicle _x} foreach units _grp;deleteGroup _grp; if (!isnil "_cargoGrp") then { {deleteVehicle _x} foreach units _cargoGrp;deleteGroup _cargoGrp;}; }foreach _fGrp;}; _eosAct=false; if (_debug) then {hint "Zone Cached";}; }; if (triggeractivated _clear and triggeractivated _taken and !_civZone)exitwith {// IF ZONE CAPTURED BEGIN CHECKING FOR ENEMIES _cGrps=0;_aGrps=0;_bGrps=0;_dGrps=0;_eGrps=0;_fGrps=0; while {triggeractivated _eosActivated AND !(getmarkercolor _mkr == "colorblack")} do { if (!triggeractivated _clear) then { _mkr setmarkercolor hostileColor; _mkr setmarkerAlpha _mAH; if (_debug) then {hint "Zone Lost";}; }else{ _mkr setmarkercolor VictoryColor; _mkr setmarkerAlpha _mAN; if (_debug) then {hint "Zone Captured";}; }; sleep 1;}; // PLAYER LEFT ZONE _eosAct=false; };sleep 0.5;}; deletevehicle _clear;deletevehicle _taken; if (!(getmarkercolor _mkr == "colorblack")) then { null = [_mkr,[_aGrps,_aSize],[_bGrps,_bSize],[_cGrps,_cSize],[_dGrps,_eGrps,_fGrps,_fSize],_settings,true] execVM "eos\core\eos_core.sqf"; }else{_Mkr setmarkeralpha 0;}; }; feel free to use it and modify it to your taste. It works on dedicated and host as I tested. Regards, Holo. Share this post Link to post Share on other sites
-ami- mofo 13 Posted March 14, 2014 I noticed that when adding a spawn marker (tried spawning objects via a trigger) inside the EOS marker area most of the time it didn't work. The objects spawned 2 out of 6 times. Outside the markers it works everytime. Here's what I used... _object = "Land_TBox_F" createVehicle (getMarkerPos "spawnobj"); GuardOne_X = [getMarkerPos "spawnobj", EAST, ["O_Soldier_TL_F", "O_Soldier_F"]] call BIS_fnc_spawnGroup; {_x allowFleeing 0} forEach units GuardOne_X; Has anyone else had the same problem? Or not? Have you managed a way to make it work? Share this post Link to post Share on other sites
holo89 10 Posted March 14, 2014 Also for the despawning vehicles even if a player is driving it I found something that I tested on a dedicated server successfully. In the eos_core.sqf (again) in the cache portion of light vehicle, armor vehicle, mortar and Helicopter Transport replace that line: if (!(vehicle player == _vehicle)) then {{deleteVehicle _x} forEach[_vehicle];}; for this: if ({isPlayer _x} count (crew _vehicle) == 0) then {{deleteVehicle _x} forEach[_vehicle];}; so no player that is inside a vehicle will have his vehicle despawned. Hope this help. Holo. Share this post Link to post Share on other sites
MiniGunDad 0 Posted March 14, 2014 My recent testing has shown that the Kill Counter works great when you host a game on your own machine, but it does not seem to work when the scenario is running on a Server. Is it just me or is this a known issue? For info; I have exported the EOS_1_98.Altis example to a multiplayer scenario and then run it on my PC. Kill Counter works great. I copied the file to my LAN Server PC and run the Server. Connected to the game and started the scenario but the kill counter doesn't show in the hints. Interestingly enough neither does the unit spawning hint show. Any ideas anyone? Share this post Link to post Share on other sites
meatball 25 Posted March 14, 2014 (edited) Also for the despawning vehicles even if a player is driving it I found something that I tested on a dedicated server successfully.In the eos_core.sqf (again) in the cache portion of light vehicle, armor vehicle, mortar and Helicopter Transport replace that line: if (!(vehicle player == _vehicle)) then {{deleteVehicle _x} forEach[_vehicle];}; for this: if ({isPlayer _x} count (crew _vehicle) == 0) then {{deleteVehicle _x} forEach[_vehicle];}; so no player that is inside a vehicle will have his vehicle despawned. Hope this help. Holo. Awesome! I'll have to dig in the script because I wonder if there's any way to just completely pull that vehicle out of the check after that point. Great that it won't despawn while players are in it/driving, but wouldn't it still possibly despawn the if the players all pile out for some reason? Once players get in a vehicle, it should stay in game till they wreck it or it gets blown up, and then normal cleanup scripts should be able to deal with it. Edited March 14, 2014 by Meatball Share this post Link to post Share on other sites
holo89 10 Posted March 14, 2014 Awesome! I'll have to dig in the script because I wonder if there's any way to just completely pull that vehicle out of the check after that point. Great that it won't despawn while players are in it/driving, but wouldn't it still possibly despawn the if the players all pile out for some reason? Once players get in a vehicle, it should stay in game till they wreck it or it gets blown up, and then normal cleanup scripts should be able to deal with it. If you apply this fix, it will be pulled out. The objects (here the vehicles) are put in local variables and this "IF" is the only place where it gets a chance to delete them. After that, the script launch itself with only a "count number" (lets say there was 3 light vehicles, you destroyed 2 and took one to flee, 0 light vehicle will be taken to call the script again). And after it call itself with these new numbers, the script end, cleaning all objects references, since they were local to the script. I tested taking a vehicle, brigning it out of range so they despawned, but not the vehicle I was in. I came back to the zone without the vehicle and got back out of zone and my stolen vehicle was still there. So you'll need a cleanup script that takes care of those errant vehicles (or not?). Share this post Link to post Share on other sites
meatball 25 Posted March 16, 2014 (edited) Hmm....Anyone know if it's possible to make the markers flash? Edited March 16, 2014 by Meatball Share this post Link to post Share on other sites
bangabob 37 Posted March 16, 2014 Hmm....Anyone know if it's possible to make the markers flash? Its possible but its looks wrong. If multiple markers flash at the same time they tend to flash at different speeds. Share this post Link to post Share on other sites
StaticDET5 1 Posted March 18, 2014 I just pushed out a bunch of changes to my build and things have broken. BangaBob, do you know what happens if you push a negative value to the number or size of the groups in the EOS spawn lines? Example: null = [["Town_1"],[-1,3],[0,0],[3,1,90],[2,60],[0],[1,0,90],[0,0,350,EAST,FALSE]] call EOS_Spawn; null = [["Town_1"],[2,-1],[0,0],[3,1,90],[2,60],[0],[1,0,90],[0,0,350,EAST,FALSE]] call EOS_Spawn; The above are implicit definitions. I'm trying to use random numbers to simulate a town having a chance of being empty. Share this post Link to post Share on other sites
holo89 10 Posted March 18, 2014 to my thinking, using negative numbers is the same as 0. you could use the new probability fields to achieve what you want. Share this post Link to post Share on other sites
StaticDET5 1 Posted March 18, 2014 I didn't get a chance to play with the fields before I went to work. I'm wondering a couple of things. How does EOS process the line? Is it iterating over the line (If I had three patrolling groups, and a randomized size, would it generate the same size for each, or would it generate a random size for each?). In the same vein, is the probability all or nothing? If I write [3,4,80] is there an 80% chance for three groups and a 20% chance for nothing? OR, is it three chances of 80% for each group? Negative numbers don't equal zero. It seems to me that you need some input catching to make a negative number equal zero. In this case, I just don't know. I'm probably going to build a test sandbox when I get home from work tonight. I've got too many variables in my current mod build. Share this post Link to post Share on other sites
fn_Quiksilver 1604 Posted March 19, 2014 (edited) I just pushed out a bunch of changes to my build and things have broken. BangaBob, do you know what happens if you push a negative value to the number or size of the groups in the EOS spawn lines?Example: null = [["Town_1"],[-1,3],[0,0],[3,1,90],[2,60],[0],[1,0,90],[0,0,350,EAST,FALSE]] call EOS_Spawn; null = [["Town_1"],[2,-1],[0,0],[3,1,90],[2,60],[0],[1,0,90],[0,0,350,EAST,FALSE]] call EOS_Spawn; The above are implicit definitions. I'm trying to use random numbers to simulate a town having a chance of being empty. _populatedTown = [[_towns],[2,2],[2,2],[2,1,90],[2,60],[1],[1,0,90],[0,0,350,EAST,FALSE]] call EOS_Spawn; _desertedTown = [[_towns],[0,0],[0,0],[0,0,0],[0,0],[0],[0,0,0],[0,0,0,EAST,FALSE]] call EOS_Spawn; if(random 1 <= 0.5) then {_populatedTown = ... } else {_desertedTown = ...}; ^ the above abit rushed but you get the idea Edited March 19, 2014 by MDCCLXXVI Share this post Link to post Share on other sites