/* Hummer Wreck by lazyink (Full credit for code to TheSzerdi & TAW_Tonic) Updated to new format by Vampire */ private ["_missName","_coords","_crash","_crate"]; //Name of the Mission _missName = "Hunter Crash"; //DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result _coords = call DZMSFindPos; _DZMSARRAYPICS = ["B_MRAP_01_F"]; _MISSIONIMAGE = selectRandom _DZMSARRAYPICS; _picture = getText (configFile >> "cfgVehicles" >> _MISSIONIMAGE >> "picture"); //this will be %1 _msg = parseText format [" Hunter Crash


A Hunter has crashed!\nGo Investigate the Cause of the Wreck!
", _picture ]; _msg remoteexec ["DZMS_Remote_Message",-2]; //DZMSAddMinMarker is a simple script that adds a marker to the location [_coords,_missName] ExecVM DZMSAddMinMarker; //Add the scenery _crash = createVehicle ["Land_Wreck_Hunter_F",_coords,[], 0, "CAN_COLLIDE"]; //DZMSProtectObj prevents it from disappearing [_crash] call DZMSProtectObj; //Add and fill the crate _crate = createVehicle ["Box_NATO_WpsSpecial_F",[(_coords select 0) - 14, _coords select 1,0],[], 0, "CAN_COLLIDE"]; [_crate,"weapons"] ExecVM DZMSBoxSetup; [_crate] call DZMSProtectObj; //DZMSAISpawn spawns AI to the mission. //Usage: [_coords, count, skillLevel, unitArray] [_coords,3,1,"DZMSUnitsMinor"] call DZMSAISpawn; sleep 1; [_coords,3,1,"DZMSUnitsMinor"] call DZMSAISpawn; sleep 1; //Wait until the player is within 30 meters and also meets the kill req [_coords,"DZMSUnitsMinor"] call DZMSWaitMissionComp; //Let everyone know the mission is over _picture = getText (configFile >> "cfgVehicles" >> _MISSIONIMAGE >> "picture"); //this will be %1 _msg = parseText format [" Hunter Crash


The Hunter has been Secured by Survivors!
", _picture ]; _msg remoteexec ["DZMS_Remote_Message",-2]; diag_log text format["[DZMS]: Minor SM5 Humvee Crash Mission has Ended."]; deleteMarker "DZMSMinMarker"; deleteMarker "DZMSMinDot"; //Let the timer know the mission is over DZMSMinDone = true;