Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ["Zeus Template", "Corona", {
- params ["_pos", "_obj"]; ASLToATL _pos spawn {
- _pos = _this;
- _unitsCfg = "(getText (_x >> 'faction') == 'LOP_CHR_Civ') && (getText (_x >> 'vehicleClass') == 'LOP_Men')" configClasses (configFile >> "CfgVehicles");
- _units = [];
- {
- _units pushBack (configName _x);
- } forEach _unitsCfg;
- _selected = [
- "Setting",
- [
- ["CHECKBOX", "Garrison building", false],
- ["CHECKBOX", "Patrols", true],
- ["SLIDER", "Radius", [50, 3000, 100, 0]],
- ["SLIDER", "Probability", [0, 1, 0.4, 2]],
- ["CHECKBOX", "Dynamic Simulation", true]
- ],
- {
- params ["_dialog", "_args"];
- TZ_DIALOG_RETURN = _dialog;
- },
- {
- TZ_DIALOG_RETURN = false;
- },
- []
- ] call tz_fnc_createDialog;
- if (_selected isEqualTo false) exitWith {};
- _selected params ["_garrison", "_patrols", "_radius", "_probability", "_dynamicSimulation"];
- _masks = [
- "G_Respirator_blue_F",
- "G_Respirator_white_F",
- "G_Respirator_yellow_F",
- "G_AirPurifyingRespirator_02_black_F",
- "G_AirPurifyingRespirator_02_olive_F",
- "G_AirPurifyingRespirator_02_sand_F",
- "G_AirPurifyingRespirator_01_F",
- "G_RegulatorMask_F"
- ];
- if (_garrison) then {
- _houses = nearestObjects [_pos , ["house"], _radius];
- if (count _houses > 0) then {
- {
- if ((random 1) < _probability) then {
- _houseDistance = _pos distance2D _x;
- if(_houseDistance < random [_radius*0.1, _radius*0.1, _radius]) then {
- _group = createGroup civilian;
- _positions = _x buildingPos - 1;
- {
- if ((random 1) < _probability) then {
- _class = selectRandom _units;
- _unit = _group createUnit [_class, _x, [], 0, "NONE"];
- _unit disableAi "PATH";
- if ((random 1) > 0.5) then {
- _unit setUnitPos "UP";
- } else {
- _unit setUnitPos "MIDDLE";
- };
- _unit addGoggles (selectRandom _masks);
- };
- } forEach _positions;
- if (_dynamicSimulation) then {
- _group enableDynamicSimulation true;
- };
- };
- };
- } forEach _houses;
- };
- };
- if(_patrols) then {
- _roads = _pos nearRoads _radius;
- if (count _roads > 0) then {
- _patrolCount = ((_radius/100)*_probability) max 1;
- for "_i" from 0 to _patrolCount do {
- _patrolPos = getPos (selectRandom _roads);
- _group = createGroup civilian;
- for "_i" from 0 to (selectRandom [2, 3, 4, 5]) do {
- _class = selectRandom _units;
- _unit = _group createUnit [_class, _patrolPos, [], 0, "NONE"];
- _unit addGoggles (selectRandom _masks);
- };
- if (_dynamicSimulation) then {
- _group enableDynamicSimulation true;
- };
- for "_j" from 0 to 8 do {
- _road = getPos (selectRandom _roads);
- _wp = _group addWaypoint [_road, _j];
- _wp setWaypointBehaviour "SAFE";
- };
- _wp = _group addWaypoint [getPos (leader _group), _patrolCount];
- _wp setWaypointType "CYCLE";
- };
- };
- };
- };
- }] call zen_custom_modules_fnc_register;
- ["Zeus Template", "Corona infected", {
- params ["_pos", "_obj"]; ASLToATL _pos spawn {
- _pos = _this;
- _selected = [
- "Setting",
- [
- ["SLIDER", "Radius", [50, 3000, 100, 0]],
- ["SLIDER", "Probability", [0, 1, 0.4, 2]]
- ],
- {
- params ["_dialog", "_args"];
- TZ_DIALOG_RETURN = _dialog;
- },
- {
- TZ_DIALOG_RETURN = false;
- },
- []
- ] call tz_fnc_createDialog;
- if (_selected isEqualTo false) exitWith {};
- _selected params ["_radius", "_probability"];
- _civilians = _pos nearEntities ["Man", _radius];
- {
- if(!isPlayer _x) then {
- if ((random 1) < _probability) then {
- _x setVariable ["TEMPERATURE", (random [36, 37, 43]), true];
- } else {
- _x setVariable ["TEMPERATURE", (random [36, 36.6, 36.6]), true];
- };
- };
- } forEach _civilians;
- };
- }] call zen_custom_modules_fnc_register;
- ["Zeus Template", "Enabled AI", {
- params ["_pos", "_obj"]; ASLToATL _pos spawn {
- _pos = _this;
- _selected = [
- "Setting",
- [
- ["SLIDER", "Radius", [50, 3000, 100, 0]],
- ["SLIDER", "Probability", [0, 1, 0.4, 2]]
- ],
- {
- params ["_dialog", "_args"];
- TZ_DIALOG_RETURN = _dialog;
- },
- {
- TZ_DIALOG_RETURN = false;
- },
- []
- ] call tz_fnc_createDialog;
- if (_selected isEqualTo false) exitWith {};
- _selected params ["_radius", "_probability"];
- _civilians = _pos nearEntities ["Man", _radius];
- {
- if(!isPlayer _x) then {
- if ((random 1) < _probability) then {
- _x enableAI "All";
- };
- };
- } forEach _civilians;
- };
- }] call zen_custom_modules_fnc_register;
- _temp_act =
- [
- "Temperatura",
- "Temperatura",
- "",
- {
- _t = _target getVariable ["TEMPERATURE", 36.6];
- hintC ("Temperatura: " + str(_t));
- },
- {true}
- ] call ace_interact_menu_fnc_createAction;
- ["Civilian_F", 0, ["ACE_MainActions"], _temp_act, true] call ace_interact_menu_fnc_addActionToClass;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement