This commit is contained in:
He-Man 2017-04-01 18:39:08 +02:00
parent 840a5dc368
commit 85ec5d1f5e
5 changed files with 53 additions and 4 deletions

View File

@ -10,3 +10,11 @@ Make your Changes in sem_config.sqf in the root folder of this pbo.
- Added Bandit Camp #4
- Complete rewritten loot script (scripts\fn_crateLoot.sqf)
- Other smaller fixes / changes (don't remember all)
Last Changelog:
2017-04-01
- Fixed: Dynamic missions were broken, also if in Config activated
- Added: Some Options to Bandit Device (sem\missionsStatic\bDevice.sqf)
- Alarm fpor x minutes after x minutes after mission start, if AI's not killed
- Big explosions with damaged Buildings and Earthquake within x meter from Device
- Fixed: A small bug in loot script

BIN
sem.pbo

Binary file not shown.

View File

@ -243,6 +243,7 @@
publicvariable 'SEM_Client_GlobalHint';
[
[SEM_staticMissions, SEM_staticMissionsPath ,"static"]
[SEM_staticMissions, SEM_staticMissionsPath ,"static"],
[SEM_dynamicMissions, SEM_dynamicMissionsPath ,"dynamic"]
] call SEM_fnc_missionController;
};

View File

@ -6,10 +6,17 @@ private["_pos","_timeout","_name","_missionID","_missionType","_missionObjects",
Edited by KiloSwiss
*/
/*
Update 27.03.2017
Update 29.03.2017
By [Ignatz] He-Man
*/
// Start additional Settings only for bDevice (Added by [Ignatz] He-Man)
_UseExplodeOnTimeout = false; // If the AI's are not killed after a defined time, the missions ends with "failed", a big explosion comes up with Earthquake
_DeviceTimeout = 30; // 30 mins to kill the AIs
_alarmtime = 1.5; // 1.5 mins Alarm bofore Explosion
_damagenearhouses = true; // Houeses near the exploding device can be damaged
_damageRadius = 1000; // Radius effected by damage (higher the number, higher the risk of lag)
// End additional Settings
_pos = _this select 0;
_name = _this select 1 select 1;
@ -48,11 +55,44 @@ Remove the device and enemies as soon as possible!";
[0,_hintString] remoteexec ["SEM_Client_GlobalHint",-2];
/* Mission End Conditions */
private ['_endcondition'];
_start = time;
_units = units _group;
_endcondition = 0;
_DeviceTimeout = time + (_DeviceTimeout*60);
waitUntil{ sleep 5;
_endCondition = [_pos,_units,_start,_timeout,_missionID,[_box1]]call SEM_fnc_endCondition;
(_endCondition > 0)
(_endCondition > 0 || if (_UseExplodeOnTimeout) then {time > _DeviceTimeout} else {false})
};
if (_endcondition < 1 && _UseExplodeOnTimeout) then {
for '_i' from 10 to (_alarmtime*60) step 10 do {
playSound3D ["a3\sounds_f\sfx\alarm_opfor.wss", objnull, false, ATLtoASL _pos, 15, 1, 3000];
uisleep 10;
_endCondition = [_pos,_units,_start,_timeout,_missionID,[_box1]]call SEM_fnc_endCondition;
if (_endCondition > 0) exitwith {};
};
if (_endCondition < 1) then {
_playersNear = _pos nearEntities[["Epoch_Male_F", "Epoch_Female_F"], _damageRadius];
{
[_pos] remoteExec ['EPOCH_client_earthQuake',_x];
} forEach _playersNear;
for '_i' from 0 to 10 do {
_dist = [6,15] call BIS_fnc_randomInt;
_direction = [0,359] call BIS_fnc_randomInt;
_randomPos = [_pos,_dist,_direction] call BIS_fnc_relPos;
_bomb = createVehicle ["SatchelCharge_Remote_Ammo_Scripted",_randomPos,[],0,"CAN_COLLIDE"];
_bomb setPosATL [_randomPos select 0, _randomPos select 1, 0.1];
uisleep 0.25;
_bomb setdamage 1;
uisleep 0.25;
};
if (_damagenearhouses) then {
_nearhouses = nearestobjects [_pos,['house'],_damageRadius];
{
_x setdamage ((random [0,((_damageRadius-(_pos distance _x))/_damageRadius),2])min 1);
} foreach _nearhouses;
};
};
};
SEM_globalMissionMarker = [false,_endCondition,_missionID,_missionType];

View File

@ -895,7 +895,7 @@ _out = switch (_loadout) do {
else {
for "_i" from 1 to (_min + _add) do {
_item = selectrandom _objArr;
_objArr = _objArr - [_item];
// _objArr = _objArr - [_item];
if (_item isequaltype []) then {
_crate addWeaponCargoGlobal [(_item select 0), 1];
_crate addMagazineCargoGlobal [(_item select 1), 2];