custom radioactive locations with radiated objects

This commit is contained in:
DESKTOP-UH65DCE\MusTanG 2017-10-23 01:45:14 -05:00
parent 103cf4610a
commit f7c71e1d5a
2 changed files with 19 additions and 0 deletions

View File

@ -283,6 +283,20 @@ if !(_radioactiveLocations isEqualTo []) then {
_markers = ["Radiation", _position] call EPOCH_server_createGlobalMarkerSet;
};
};
_customRadioactiveLocations = getArray(_epochConfig >> worldName >> "customRadioactiveLocations");
if !(_customRadioactiveLocations isEqualTo []) then {
{
_x params [["_position",[0,0,0]],["_radius",0],["_className",""] ];
if ((!(_position isEqualTo [0,0,0]) && !(_radius isEqualTo 0) && !(_className isEqualTo "")) && ((nearestObjects [_position, _blacklist, _distance]) isEqualTo [])) then{
_object = (_x select 2) createVehicle _position;
_object setVariable ["EPOCH_Rads",[random 666,(_x select 1)],true];
_markers = ["Radiation", _position] call EPOCH_server_createGlobalMarkerSet;
_object setVariable ["EPOCH_MarkerSet",_markers,true];
}else{
diag_log "EPOCHDebug:Check your custom radioactive locations for errors or blacklisted locations";
};
}forEach _customRadioactiveLocations;
};
};
missionNamespace setVariable ["EPOCH_radioactiveLocations", _radioactiveLocationsTmp, true];

View File

@ -66,6 +66,11 @@ class CfgEpoch
// Block radioactive locations spawn
radioactiveLocBLObjects[] = {"PlotPole_EPOCH"};
radioactiveLocBLDistance = 500;
customRadioactiveLocations[] = { // position , intensity , object to spawn radiated
// {{11650,11900,0}, 500, "Land_Device_assembled_F"},
// {{0,0,0}, 0, ""} //any of these will throw an error in the rpt
// leave this empty to spawn 0 custom locations
};
traderBlds[] = {"House", "Building"};
traderHomes[] = {"House", "Building"};
traderUniforms[] = {"U_OG_leader", "U_C_Poloshirt_stripped", "U_C_Poloshirt_blue", "U_C_Poloshirt_burgundy", "U_C_Poloshirt_tricolour", "U_C_Poloshirt_salmon", "U_C_Poloshirt_redwhite", "U_C_Poor_1", "U_C_WorkerCoveralls", "U_C_Journalist", "U_C_Scientist", "U_OrestesBody"};