Jump to content

cpthammerbeard

Member
  • Content Count

    21
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About cpthammerbeard

  • Rank
    Private First Class
  1. cpthammerbeard

    EH for Disarming a mine

    @Johnny - hahaha, I forget I'd started that, I thought I'd googled it lol. Thanks for posting. Note to self, stop posting things after a few beers :P
  2. cpthammerbeard

    EH for Disarming a mine

    I used this for an underwater mine clearance mission //ARRAY to store mines _myMines = []; //spawn in 8 mines at randmo positions around my marker for "_i" from 1 to 8 do { _minePos = [_NavalMinePos,10,60,10,2,0,0] call BIS_fnc_findSafePos; _mineSpawn = createMine ["UnderwaterMine",_minePos,[],0]; //Add mine to ARRAY _myMines pushBack _mineSpawn; _mineSpawn setPosATL [_minePos select 0,_minePos select 1,(getPosATL _mineSpawn select 2) - 2]; [_mineSpawn,"BIS_fnc_spawn",true,true] call BIS_fnc_MP; }; //Create thread to monitor mines _checkMines = _myMines spawn { //Passed mines ARRAY _mines = _this; //Loop forever while { true } do { //Exit loop if the are 0 active mines if ( { mineActive _x }count _mines == 0 ) exitWith { //Set variable minesDefused = true; }; /*Check 10 seconds*/ sleep 10; }; }; waitUntil{(!isNil ("minesDefused"))}; //Insert the rest of your code here It's adapted from someone who gave me the code, can't find the post though. Apologies for not crediting. Hope it helps Cheers
  3. Excellent stuff, I've just been getting to grips with the Artillery in the previous release. How would I go about adding the action to an SDV and calling in Guided Bombs using the gunners seat laser marker? I had it working in SP, code below, but in server side tests it wouldn't update to the position of the laser marker. Add an Action to the Gunners Seat BLUSHQ1 addEventHandler ["getIn", { if (_this select 1 == "gunner") then { //add statement below [[bLUSHQ1,["Call Guided Strike",{call HMB_fnc_fireSupports}]],"addAction",true,true,false] call BIS_fnc_MP; };}]; fn_fireSupports _target = _this select 0; _caller = _this select 1; _id = _this select 2; _arguments = _this select 3; _designatedPos = position laserTarget _target; guidedTemplate = ["Bo_GBU12_LGB",1,1,1,1,0.1,0.1,true] call Zen_createFireSupport; [_designatedPos,guidedTemplate,_target] call Zen_InvokeFireSupport; Cheers Sam
  4. Nice Zen, Got some feedback/suggestions for you. We've been using your framework in our mission pack, I'll send you a copy. It's still a work in progress but here we go... Spawn Fortification occasionally gives an error when attempting to place a static weapon, I think it's due to the gradient of a random placement. BoatPatrols always end up stuck on the beach, but that's prob an Arma issue. Infantry Garrisons stay static, could they move about in house? ChopperMove - noticed if a chopper can't find a suitable space via BIS_fnc_findSafePos it defaults to the thin strip of land connecting the south island on Altis. Suggestion - CancelOrder, I recently had an extraction mission problem, if the hostage died after the chopper was enRoute, the chopper would complete extraction route before declaring hostage dead . Solution was to spawn the orderExtraction from a function and on hostage death use helicopterLand. Would be nice to have a cancel order. FireSupport is good, have you considered CAS? The built in CAS seems to hang about taking out as many targets as possible rather than single strike. Add Action - this has caused me no end of trouble, I understand it all now but if it was within your framework I bet it would have taken a lot of the pain away! Hint/PlaySound - again understanding BIS_fnc_MP was a challenge, I can now use it effectively, but for a new scriptwriter an easier Zen function would have been handy Thanks again for the effort.
  5. cpthammerbeard

    CH Mobile Headquarters

    Champ-1, this script is brilliant, I love it. Quick question, I tried to add an SDV, added the class list with [] for the composition and it won't take it. You get the Deploy MHQ near land, but not when at depth or away from shore, would be nice but not essential if there was a fix. Anyway, in our mission pack we're using Marids as MHQs, below is the composition we used for it, might be useful for someone. case (toLower "O_APC_Wheeled_02_rcws_F") : { _composition = [["CamoNet_INDP_big_Curator_F",[-2.18277,-0.473415,0.000566483],-359.981],["ModuleChemlightRed_F",[-1.36815,-2.9854,0.000566483],-359.981],["Land_Razorwire_F",[2.78963,1.75545,0.000566483],-99.2007],["Land_BarrelWater_F",[-0.666675,3.9968,0.000624657],-0.864716],["Land_BarrelWater_F",[0.0409352,4.27831,0.000624657],-0.875946],["O_CargoNet_01_ammo_F",[-2.27552,4.11548,0.000566006],-59.435],["Land_BarrelWater_F",[-0.592652,4.90351,0.000624657],-0.865234],["Land_BagFence_Long_F",[3.59061,-3.66229,0.000566483],-263.536],["ModuleChemlightRed_F",[-4.98858,2.10122,0.000566483],-359.981],["O_CargoNet_01_ammo_F",[-4.58421,3.83107,0.000566483],-339.013],["Land_Razorwire_F",[-0.57078,6.09882,0.000566483],-359.981],["Land_BagFence_Round_F",[2.33203,-6.04226,0.000566483],-20.0836],["Land_CampingChair_V1_F",[-5.15567,-4.23808,0.00369167],-258.723],["Land_CampingTable_F",[-6.01811,-4.65186,0.000565052],-119.639],["Land_CampingChair_V1_F",[-5.30711,-5.96654,0.00368977],-218.204],["FlexibleTank_01_forest_F",[-8.02475,0.478183,0.000669003],-359.887],["Land_MetalCase_01_large_F",[-8.23797,-0.551533,0.000566959],0.00421143],["Land_GasTank_01_blue_F",[-8.20019,-1.50711,0.000607967],-0.551971],["B_GMG_01_high_F",[-3.72459,-7.48854,-0.0112429],-245.001],["Land_Razorwire_F",[-7.88963,3.08117,0.000566483],-232.341],["Land_BagFence_Long_F",[-3.73847,-8.12623,0.000566483],-359.086],["Land_BagFence_Long_F",[-7.8955,-4.49842,0.000566483],-307.93],["Land_BagFence_Long_F",[-6.09499,-6.83445,0.000566483],-312.22],["Land_BagFence_Long_F",[-9.6531,-2.35283,0.00156641],-307.93]]; _cargoInfo = ["Land_Ammobox_rounds_F",[0,-1.2,0],0]; [_obj, _side, _cargoInfo, _composition] call CHHQ_fnc_startingSetup; }; }; Nice job, and thanks.
  6. Hi there, script is awesome in SP, but having some problems with MP execution. I have this script here _smAttachMine = getMarkerPos "smAttachMineTwo"; drugShip = "C_Boat_Civil_04_F" createVehicle _smAttachMine; I'm using the following for the addAction _attachCharge = [[drugShip,["Place Explosive Charge",{[drugShip,player,0] execVM "scripts\attach_charge.sqf"}]],"addAction",true,true,false] call BIS_fnc_MP; my problem is the error message shows drugShip as undefined for the pass through to the execVM. If I define as a publicVariable like below, the adddAction doesn't execute attach_charge. _smAttachMine = getMarkerPos "smAttachMineTwo"; drugShip = "C_Boat_Civil_04_F" createVehicle _smAttachMine; Any thoughts?
  7. I found this as well however, if they detect an enemy they'll disembark. Zen_orderExtraction, is it intended behaviour that when the vehicle gets to the 2nd marker the group that was extracted sit in the vehicle until you order them out?
  8. Nice one, thanks Zen, that's just given me my next mission to write.
  9. cpthammerbeard

    Scripted Mine Clearance

    That works wonderfully! Thanks Larrow.
  10. Hello, I'm looking for a bit of help with a condition. The task is to clear out mines. The mines are scripted and generated in random positions and therefore don't have names assigned to them so I can't check using !mineActive mine1 and !mineActive mine2......... //get the editor based marker _smNavalMinePos = getMarkerPos "smNavalClearOne"; //create visible area marker and area for enemy divers to patrol _smNavalMineArea = createMarker ["smNavalClearOneArea",_smNavalMinePos]; _smNavalMineArea setmarkerShape "ellipse"; _smNavalMineArea setMarkersize [130,130]; _smNavalMineArea setMarkerColor "colorBlack"; for "_i" from 1 to 8 do { //find a random location _minePos = [_smNavalMinePos,10,60,10,2,0,0] call BIS_fnc_findSafePos; //create a mine _mineSpawn = createMine ["UnderwaterMine",_minePos,[],0]; //sink mine 2m below the surface _mineSpawn setPosATL [_minePos select 0,_minePos select 1,(getPosATL _mineSpawn select 2) - 2]; }; //create tigger to check the state of placed mines _trgMineChecker = createTrigger ["EmptyDetector", _smNavalMinePos]; _trgMineChecker setTriggerArea[130,130,0,false]; _trgMineChecker setTriggerActivation["ANY","PRESENT",false]; _trgMineChecker setTriggerStatements["({!mineActive _x} count thisList) == 8","minesDefused = true", ""]; waitUntil{(!isNil ("minesDefused"))}; //win lose messages switch (minesDefused) do { case true: { hint "its true"; }; case false: { hint "its false"; }; }; Many thanks :)
  11. Perfect, thanks very much Zen ;)
  12. Ah yes, I see Zooloo75. You don't the forEach nice fix.
  13. cpthammerbeard

    Random Squad Spawn?

    EOS doesn't have to be located in towns, you can use any marker. Zenophons framework is really cool. Once in you could use something like //pick a random number of maximum squad to spawn _guerReinforcementRandomMax = [3,4] call BIS_fnc_selectRandom; for "_i" from 1 to _guerReinforcementRandomMax do { //find a random spawn point for each squad _guerInfSpawn = [_guerReinforcementPatrolArea,700,700,5,0,150,0] call BIS_fnc_findsafePos; //spawn in the squad with between 5 and 7 members _guerInfReinforcement = [_guerInfSpawn, independent, "infantry", [5,7]] call Zen_SpawnInfantry; //tell that squad to patrol in the marker area [_guerInfReinforcement,"YourMarkerAreaToBePatrolled",[],0,"normal"] spawn Zen_OrderInfantryPatrol; };
×