Member
Last active 8 years ago
Well weird i am using CUP terrains too. And Takistan is not working fine. There always some installations as road lights, fireplaces, graves, sheds, and others.
In launch parameters add -malloc=system
My server has crashed once but when i have set allocator to "system" server is not crashing anymore.
Well i assume there are no possibility to blacklist that objects by staticData or whatever. I need to blew up the whole place. I have created script that blew up all "houses" in range 20m. But when f.e. object is a "grave" (which is happen once) it cant be destroyed. Is there any other possibility to send notify to players when installation objects are destroyed and removed from OPCOM_instances? Are there such event handler or something what could be used in easiest way that the script does??
private ["_insIEDfactory", "_insRHQ", "_insweaponsdepot", "_assymetricFaction", "_choose", "_OPCOM_HANDLER", "_objectives", "_objective", "_factory", "_HQ", "_depot", "_position", "_markerF", "_EHExploIdxF", "_markerR", "_EHExploIdxR", "_markerW", "_EHExploIdxW"]; _insIEDfactory = []; _insRHQ = []; _insweaponsdepot = []; _assymetricFaction = "OPF_MTI_F"; if (_assymetricFaction in (((OPCOM_instances select 0) select 2) select 1)) then { _choose = 0; }else{ _choose = 1; }; _OPCOM_HANDLER = OPCOM_instances select _choose; _objectives = [_OPCOM_HANDLER,"objectives",[]] call ALiVE_fnc_HashGet; { _objective = _x; _factory = [_OPCOM_HANDLER,"convertObject",[_objective,"factory",[]] call ALiVE_fnc_HashGet] call ALiVE_fnc_OPCOM; _insIEDfactory pushback _factory; _HQ = [_OPCOM_HANDLER,"convertObject",[_objective,"HQ",[]] call ALiVE_fnc_HashGet] call ALiVE_fnc_OPCOM; _insRHQ pushback _HQ; _depot = [_OPCOM_HANDLER,"convertObject",[_objective,"depot",[]] call ALiVE_fnc_HashGet] call ALiVE_fnc_OPCOM; _insweaponsdepot pushback _depot; } foreach _objectives; _insIEDfactory = _insIEDfactory - [objNull]; _insRHQ = _insRHQ - [objNull]; _insweaponsdepot = _insweaponsdepot - [objNull]; { if (isnil {_x getVariable "EHExploIdxF"}) then { if (_x isKindOf "house" || _x isKindOf "building") then { _position = getpos _x; _markerF = createMarkerLocal [format ["%1_factory_%2_%3", floor(random 100000), floor(random 100000), _forEachIndex + 1], _position]; _markerF setMarkerSizeLocal [300, 300]; _markerF setMarkerShapeLocal "ELLIPSE"; _x setVariable ["factory_marker",_markerF,false]; _EHExploIdxF = _x addEventHandler ["Explosion",{ params ["_object", "_nearBuildings", "_trashes", "_oamarker", "_bomb", "_EHid"]; _nearBuildings = nearestObjects [_object, ["house","building"], 20]; _trashes = nearestObjects [_object, ["ALIVE_IEDUrbanSmall_Remote_Ammo", "ALIVE_IEDLandBig_Remote_Ammo", "Land_RattanTable_01_F", "Fridge_01_open_F", "Land_WaterCooler_01_new_F", "Land_MapBoard_F"], 25]; _oamarker = (_object getVariable "factory_marker"); _EHid = _object getVariable "EHExploIdxF"; _object removeEventHandler ["Explosion", _EHid]; _object setVariable ["EHExploIdxF",nil ,false]; _bomb = createVehicle ["Bo_Mk82",[getPos _object select 0, getPos _object select 1,0],[], 0, 'FLY']; [_bomb,-90,0] call BIS_fnc_setPitchBank; _bomb setVelocity [0, 0, -80]; {_x setDamage 1;} foreach _nearBuildings; {deleteVehicle _x;} foreach _trashes; [_oamarker, "IEDfactoryDestroyed", "IED factory"] call INS_fnc_sendNotif; { if (!isnull _x) then { if (alive _x) then { deleteVehicle _x; }; }; } foreach _nearBuildings; }]; _x setVariable ["EHExploIdxF",_EHExploIdxF,false]; }; }; } forEach _insIEDfactory; { if (isnil {_x getVariable "EHExploIdxR"}) then { if (_x isKindOf "house" || _x isKindOf "building") then { _position = getpos _x; _markerR = createMarkerLocal [format ["%1_rhq_%2_%3", floor(random 100000), floor(random 100000), _forEachIndex + 1], _position]; _markerR setMarkerSizeLocal [300, 300]; _markerR setMarkerShapeLocal "ELLIPSE"; _x setVariable ["rhq_marker",_markerR,false]; _EHExploIdxR = _x addEventHandler ["Explosion",{ params ["_object", "_nearBuildings", "_trashes", "_oamarker", "_bomb", "_EHid"]; _nearBuildings = nearestObjects [_object, ["house","building"], 20]; _trashes = nearestObjects [_object, ["ALIVE_IEDUrbanSmall_Remote_Ammo", "ALIVE_IEDLandBig_Remote_Ammo", "Land_RattanTable_01_F", "Fridge_01_open_F", "Land_WaterCooler_01_new_F", "Land_MapBoard_F"], 25]; _oamarker = (_object getVariable "rhq_marker"); _EHid = _object getVariable "EHExploIdxR"; _object removeEventHandler ["Explosion", _EHid]; _object setVariable ["EHExploIdxR",nil ,false]; _bomb = createVehicle ["Bo_Mk82",[getPos _object select 0, getPos _object select 1,0],[], 0, 'FLY']; [_bomb,-90,0] call BIS_fnc_setPitchBank; _bomb setVelocity [0, 0, -80]; {_x setDamage 1;} foreach _nearBuildings; {deleteVehicle _x;} foreach _trashes; [_oamarker, "RecruitmentHQdestroyed", "Recruitment HQ"] call INS_fnc_sendNotif; { if (!isnull _x) then { if (alive _x) then { deleteVehicle _x; }; }; } foreach _nearBuildings; }]; _x setVariable ["EHExploIdxR",_EHExploIdxR,false]; }; }; } forEach _insRHQ; { if (isnil {_x getVariable "EHExploIdxW"}) then { if (_x isKindOf "house" || _x isKindOf "building") then { _position = getpos _x; _markerW = createMarkerLocal [format ["%1_wpd_%2_%3", floor(random 100000), floor(random 100000), _forEachIndex + 1], _position]; _markerW setMarkerSizeLocal [300, 300]; _markerW setMarkerShapeLocal "ELLIPSE"; _x setVariable ["wpd_marker",_markerW,false]; _EHExploIdxW = _x addEventHandler ["Explosion",{ params ["_object", "_nearBuildings", "_trashes", "_oamarker", "_bomb", "_EHid"]; _nearBuildings = nearestObjects [_object, ["house","building"], 20]; _trashes = nearestObjects [_object, ["ALIVE_IEDUrbanSmall_Remote_Ammo", "ALIVE_IEDLandBig_Remote_Ammo", "Land_RattanTable_01_F", "Fridge_01_open_F", "Land_WaterCooler_01_new_F", "Land_MapBoard_F"], 25]; _oamarker = (_object getVariable "wpd_marker"); _EHid = _object getVariable "EHExploIdxW"; _object removeEventHandler ["Explosion", _EHid]; _object setVariable ["EHExploIdxW",nil ,false]; _bomb = createVehicle ["Bo_Mk82",[getPos _object select 0, getPos _object select 1,0],[], 0, 'FLY']; [_bomb,-90,0] call BIS_fnc_setPitchBank; _bomb setVelocity [0, 0, -80]; {_x setDamage 1;} foreach _nearBuildings; {deleteVehicle _x;} foreach _trashes; [_oamarker, "Weaponsdepotdestroyed", "Weapons depot"] call INS_fnc_sendNotif; { if (!isnull _x) then { if (alive _x) then { deleteVehicle _x; }; }; } foreach _nearBuildings; }]; _x setVariable ["EHExploIdxW",_EHExploIdxW,false]; }; }; } forEach _insweaponsdepot;
This behavior looks like poor fps on server. Check your server FPS.
This is strange i am already playing on takistan with the same version of ALiVE and CUP terrains/core and everything that you posted works perfect.
Yes same here. There are only one problem. Streetlights and others weird objects being picked up for some installations.
Thanks Spyder works perfect.
There no errors. Its simply pick up a street lamps and other weird objects as building. Spyder you are right.
cursorObject isKindoF "house" or cursorObject isKindoF "building" on them returning true .
The goal is how to blacklist them?