Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

nephros

Member
  • Content Count

    60
  • Joined

  • Last visited

  • Medals

Everything posted by nephros

  1. With trackIR, the cross hairs on the medium military heli aren't useful since they move with your head. Is there an easy way to add cross-hairs that are fixed to the helicopter position? Or better yet, a way to get the HUD from the ARMA-2 UH-1 venom and add it to the TOH medium heli? I'm still a fledgling scripter, but if someone points me in the right direction I'll work on it.
  2. [sP] SAINT 4-1: Helicopter Pilot Altis Requirements: helicopters DLC Brief: This is a dynamic task-based helicopter pilot game. All base helicopter models and some variants are available in game. Missions are randomly assigned by calling in for assignment via the radio menu. Features: -Choose a specific mission time, or random. -Weather changes randomly with time changes. -Mission type can be toggled to completey random vs. helicopter specific -Missions can be cancelled. -ambient helicopters and planes -radio text chat can be toggled on/off (in cockpit - for those who want unobstructed view of instrument panel) -Request team of 0-3 crew members for your helicopter, change as needed. -29 mission types including transport, slingload, and attack varieties with random placement. -Random enemy patrol presence around landing zones -GPS coordinates of landing zones occasionally inaccurate, requiring player to search for troops -Random enemy AA throughout map, location changes each mission. -adjustable difficulty: no AA, light AA (one rocket each), regular AA (1-4 rockets each) -Functional doors on some helicopter models. -Artillery support available. -In case of crash – must destroy helicopter, move to extract site, and call for extraction to airbase. Any troops currently in transport will disembark and wait for you to return. -Rearm, repair, refuel helipads available at main airbase. -Can dump fuel from cockpit menu to 25%, 50%, or 75%, which will change helicopter weight and thereby change slingloading weight capacity. Presence of crew members adds weigh to helicopters. -Slingloading targets have variable weights, helicopters may require modification as above in order to slingload. -Table of helicopter external weight limits vs. fuel tank level in map menu. -Taru missions involve switching to correct loadout. -medevac patient injury severity is random, deteriorates with time in flight -Basic mission stats are kept in logbook. Missions: Available Helicopters: Mission Briefing: Known Bugs: Acknowledgements: Download: steam link: http://steamcommunity.com/sharedfiles/filedetails/?id=600926531 Armaholic mirror: http://www.armaholic.com/page.php?id=30206 All Input on bugs, potential future mission types, and game play are welcome. Thanks! Nephros
  3. [CUP] Helicopter Pilot: Altis SAINT 4-1 Background: NATO forces have recently captured Altis Island as a staging ground for invasion of Eurasia. We control the airfields and have established outposts across the island. Mopping up operations are underway. Remaining enemy forces are putting up bitter resistance and continue to receive reinforcement from the mainland. The local population is primarily hostile to NATO. Situation: You are an all-purpose rotary wing aircraft pilot in squadron HMU-86 'Saints', callsign SAINT 4-1. Your primary bases of operations are Altis International Airport and the USS WASP, anchored in the inlet to Pyrgos Gulf. Mission: Fly missions in support of NATO forces on Altis. Mission types include troop transport, insertion and extraction, medevac, fastrope insertion, search and rescue, close air support, patrol, search and destroy, and slingloading cargo. Friendly Forces: NATO has 5 bases, 6 airfields and 17 outposts strategically located across the island. There are 3 hospitals used for medevac - at Pyrgos, Kavala, and Altis airbase. Artillery support is available throughout the island and mortar support in proximity to some bases. Enemy Forces: All areas of the island should be considered hostile. Aircraft frequently receive machine gun and anti-air rocket fire, especially around highly populated areas. Requirements: CBA CUP (CUP Terrains Core, CUP Terrains Map, CUP Units, CUP vehicles, CUP weapons) Optional: [MELB] Mission Enhanced Little Bird *This is the CUP/MELB version of my previous scenario SAINT 4-1: Helicopter Pilot Altis Instruction Manual: Link: http://steamcommunity.com/sharedfiles/filedetails/?id=913314881
  4. nephros

    [SP]SAINT 4-1: Helicopter Pilot Altis

    Thanks! I'm getting close to finishing the CUP version. RHS and Unsung would both be fun to do. To do them justice they both need to be full conversions of all models, not just the helos. Then there is porting to Tanoa (for all versions)... ...so many ideas, so little time!
  5. nephros

    [SP]SAINT 4-1: Helicopter Pilot Altis

    TeTeT, Do you know how to get the LHD in EDEN? It no longer shows up in the object list and I can't find a good answer online. It doesn't show up on the CUP cfg vehicles wiki page either.
  6. nephros

    [SP]SAINT 4-1: Helicopter Pilot Altis

    Absolutely. I gave up on it last year because of a bug where the AH1Z was exploding on takeoff, and difficulty working in 3D with a 2D editor. I now realize it's a problem with the advanced flight mechanics setting, which I can bypass. And now we have the Eden editor. My original idea was to have most of the marine helicopters based out of the LHD and the others at the airfield. I'm also going to maybe separate the mission focus of land / sea targets between the two. Not completely separate them, but change the probabilities based on where you start from.
  7. nephros

    [SP]SAINT 4-1: Helicopter Pilot Altis

    I've added all MELB variants as options for modifying loadout at the little bird landing pad. I don't know how to easily allow people to independently add other vehicles to the game since the player vehicles are scripted, but if there is one you'd like, let me know. The missions aren't really geared towards planes though.
  8. nephros

    [SP]SAINT 4-1: Helicopter Pilot Altis

    Not currently, but I could add it in. I'll have to give some thought to adding some new mission types.
  9. nephros

    [SP]SAINT 4-1: Helicopter Pilot Altis

    I've finally gotten time to get back to work on the scenario. I'm working on an update to this one along with creation of a CUP vehicle version. Following that I will port it to Tanoa and maybe other maps. I'm taking an informal poll on the CUP version - At present I'm using CUP air and ground vehicles but the base ARMA3 soldier models. Would folks prefer CUP soldier models as well? A couple of screenshots from a CUP ocean search and rescue mission:
  10. nephros

    [SP]SAINT 4-1: Helicopter Pilot Altis

    Khugan, thanks, I'll get that fixed. Jnr487 - sorry, I haven't had time to look at that yet, bear with me.
  11. nephros

    [SP]SAINT 4-1: Helicopter Pilot Altis

    Thanks for the feedback. For the ambient air I have 2 scripts running, one for helicopters and one for the plane. The ambient scripts call 'masterArray', which is an array of multiple other arrays, and is called by almost all my scripts. It includes arrays of waypoints used for missions, sorted by type. These waypoints are invisible helipads placed on the map and given names listed in the arrays. Note that some of the waypoint arrays are nested arrays including both the location and a string name (base, fob, hospital, airport). The 'landat' codes for the different airports on Altis are also listed in my init for reference. Hopefully you can figure it out by looking through the scripts, but here is the code in my init that shows how 'masterArray' is built: //List of helipad sites sorted by type, and id names for groupID random name generator //aoArray radius 2500, waterArray radius 1000, deepwaterArray radius 2500 aoArray = [ao1, ao2, ao3, ao4, ao5, ao6, ao7, ao8, ao9, ao10, ao11, ao12, ao13, ao14, ao15, ao16, ao17, ao18, ao19, ao20, ao21, ao22]; idARRAY = ["ALPHA", 'BRAVO', 'CHARLIE', 'DELTA', 'ECHO', 'FOXTROT', 'GOLF', 'HOTEL', 'INDIA', 'KILO', 'LIMA', 'MIKE', 'NOVEMBER', 'OSCAR', 'PAPA', 'QUEBEC', 'ROMEO', 'SIERRA', 'TANGO', 'UNIFORM', 'VICTOR', 'WHISKEY', 'X-RAY', 'YANKEE', 'ZULU']; baseArray = [[base1, "Altis Airfield"], [base2, "Camp Longhorn"], [base3, "Camp Sooner"], [base4, "Camp Red Raider"], [base5, "Camp Bear"], [planePad2, "AAC Airfield"], [planePad3, "Ammolofi airfield"], [planePad4, "Molos Airfield"], [planePad5, "Almyra Salt Lake Airstrip"], [planePad6, "Selakeno Airfield"]]; fobArray = [[fob1, "Outpost Horned Frog"], [fob2, "Outpost Cyclone"], [fob3, "Outpost Mountaineer"], [fob4, "Outpost Cowboy"], [fob5, "Outpost Jayhawk"], [fob6, "Outpost Wildcat"], [fob7, "Outpost Aggie"], [fob8, "Outpost Mustang"], [fob9, "Outpost Bruin"], [fob10, "Outpost Buckeye"], [fob11, "Outpost Trojan"], [fob12, "Outpost Gator"], [fob13, "Outpost Wolverine"], [fob14, "Outpost Irish"], [fob15, "Outpost Seminole"], [fob16, "Outpost Bronco"]]; waterArray = [w_1, w_2, w_3, w_4, w_5, w_6, w_7, w_8, w_9, w_10, w_11, w_12, w_13, w_14, w_15, w_16, w_17, w_18, w_19, w_20, w_21, w_22, w_23, w_24, w_25, w_26, w_27, w_28, w_29, w_30, w_31, w_32, w_33, w_34, w_35, w_36, w_37, w_38, w_39, w_40, w_41, w_42, w_43, w_44, w_45, w_46, w_47, w_48, w_49, w_50, w_51, w_52, w_53, w_54, w_55, w_56]; mountainArray = [m_1, m_2, m_3, m_4, m_5, m_6, m_7, m_8, m_9, m_10, m_11, m_12, m_13, m_14, m_15, m_16, m_17, m_18, m_19, m_20, m_21, m_22, m_23, m_24, m_25, m_26, m_27, m_28, m_29, m_30, m_31, m_32, m_33, m_34, m_35, m_36, m_37, m_38, m_39, m_40, m_41, m_42, m_43, m_44, m_45, m_46, m_47, m_48, m_49, m_50, m_51, m_52, m_53, m_54, m_55]; hospitalArray = [[med1, "Kavala Hospital"], [med2, "Altis Airbase Hospital"], [med3, "Pyrgos Hospital"]]; //6 slingloadArray = [dock, airportDepot, waterDock, huronSite]; artyArray = [arty1, arty2, arty3, arty4, arty5, arty6, arty7, arty8, arty9, arty10]; deepWaterArray = [dw_1, dw_2, dw_3, dw_4, dw_5, dw_6, dw_7, dw_8, dw_9, dw_10, dw_11, dw_12, dw_13, dw_14, dw_15, dw_16, dw_17, dw_18, dw_19]; airportArray = [[planePad2, "AAC Airfield"], [planePad3, "Ammolofi airfield"], [planePad4, "Molos Airfield"], [planePad5, "Almyra Salt Lake Airstrip"], [planePad6, "Selakeno Airfield"]]; //doesn't include altis airbase. Landat codes: altis 0, aac 1, ammolifi 2, selakeno 3, molos 4, almyra 5 masterArray = [baseArray, waterArray, mountainArray, hospitalArray, idArray, fobArray, aoArray, slingloadArray, deepWaterArray, artyArray, airportArray]; // 0 1 2 3 4 5 6 7 8 9 10 For the ambient plane the following goes in the init: -All ambient planes / helicopters are civilian and set friendly to opfor so they aren't shot down and don't shoot at opfor. -deepwater array is an array of sites nearest to the edges of the map. The plane basically flies from the main airport in a random direction to a point near the edge of the map, then returns and lands at the airbase. Then repeats. -You'll notice PlaneTypeList is an array with only one variable. It started with more, but other planes wobble strangely on takeoff so I removed them. More planes can be added to the array if you want random plane types to spawn on loading. civHQ = createCenter CIVILIAN; CIVILIAN setfriend [EAST, 1]; //keeps ambient air from shooting at opfor //ambient Airplane init PlaneTypeList = ["B_Plane_CAS_01_F"]; ambientPlaneGroup1 = createGroup CIVILIAN; ambientPlaneLoop1 = [planeTypeList, deepWaterArray, ambientPlaneGroup1, 1]execVM "scripts\ambient\ambientPlane.sqf"; The script- "scripts\ambient\ambientPlane.sqf" -PlanePad1 is a position just north of Alikampos, where the plane spawns. If it spawns too close to the airport it can't execute the 'landat' code properly, so I always have it return to this position prior to landing, about 2500m away on an approach heading to the airport. This is still buggy, in that occasionally the plane gets caught in a loop circling the airport. -The scipt is set up so I can easily add a second plane by activating the inactive code, but I haven't tested this yet. //"scripts\ambient\ambientPlane.sqf" //2016 by Nephros /* plane types "B_Plane_CAS_01_F" "I_Plane_Fighter_03_CAS_F" "O_Plane_CAS_02_F" */ private ["_waypoint", "_startPos"]; //arguments _planeTypeList = _this select 0; _waypointArray = _this select 1; _group = _this select 2; _selector = _this select 3; _AltisAirbasePos = getPos planePad1; //start pos _startPos = getPos planePad1; //sets plane 1 at altis, plane 2 at AAC //not used, but works if I want to add a second ambient plane. //If (_selector == 1) then //{_startPos = _AltisAirbasePos} else //{_startPos = getPos ((_airportArray select 1) select 0); sleep 300}; _planeMaster = [_startPos, 0, "O_Plane_CAS_02_F", _group] call BIS_fnc_spawnVehicle; _plane = _planeMaster select 0; _crew = _planeMaster select 1; while {(getDammage _plane) < 1} do { _group move _AltisAirbasePos; waitUntil {unitReady _Plane}; _plane landAt 0; //landat code for altis airbase _waypoint = getPos (_waypointArray call BIS_fnc_selectRandom); _group move _waypoint; waitUntil {unitReady _Plane}; _Plane setfuel 1; }; //hint "ambient plane respawning"; deleteVehicle _plane; {deleteVehicle _x} forEach units _group; if (true) exitWith {ambientPlaneLoop1 = [planeTypeList, deepwaterArray, ambientPlaneGroup1, 1]execVM "scripts\ambient\ambientPlane.sqf"}; //switch (_group) do //{ // case ambientplaneGroup1: {ambientPlaneLoop1 = [planeTypeList, deepwaterArray, ambientPlaneGroup1, 1]execVM "scripts\ambient\ambientPlane.sqf";}; // case ambientplaneGroup2: {ambientPlaneLoop2 = [planeTypeList, deepwaterArray, ambientPlaneGroup2, 2]execVM "scripts\ambient\ambientPlane.sqf";}; //}; ambient helicopters: in init: -ambientPad1 through 6 are invisible helipads at altis airbase corresponding to spawn sites. -MasterArray is a master list that includes all map waypoints, as described above. civHQ = createCenter CIVILIAN; CIVILIAN setfriend [EAST, 1]; //keeps ambient air from shooting at opfor //ambient helicopter init heliTypeList = ["B_Heli_Transport_01_F", "B_Heli_Light_01_F", "I_Heli_light_03_F", "B_Heli_Transport_03_F", "O_Heli_Transport_04_F", "I_Heli_Transport_02_F", "B_Heli_Attack_01_F", "O_Heli_Attack_02_F", "O_Heli_Light_02_F"]; ambientHeliGroup1 = createGroup CIVILIAN; ambientHeliGroup2 = createGroup CIVILIAN; ambientHeliGroup3 = createGroup CIVILIAN; ambientHeliGroup4 = createGroup CIVILIAN; ambientHeliGroup5 = createGroup CIVILIAN; ambientHeliGroup6 = createGroup CIVILIAN; ambientHeliLoop1 = [helitypeList, ambientPad1, ambientHeliGroup1, masterArray, 0]execVM "scripts\ambient\ambientheli.sqf"; ambientHeliLoop2 = [helitypeList, ambientPad2, ambientHeliGroup2, masterArray, 60]execVM "scripts\ambient\ambientheli.sqf"; ambientHeliLoop3 = [helitypeList, ambientPad3, ambientHeliGroup3, masterArray, 120]execVM "scripts\ambient\ambientheli.sqf"; ambientHeliLoop4 = [helitypeList, ambientPad4, ambientHeliGroup4, masterArray, 180]execVM "scripts\ambient\ambientheli.sqf"; ambientHeliLoop5 = [helitypeList, ambientPad5, ambientHeliGroup5, masterArray, 240]execVM "scripts\ambient\ambientheli.sqf"; ambientHeliLoop6 = [helitypeList, ambientPad6, ambientHeliGroup6, masterArray, 300]execVM "scripts\ambient\ambientheli.sqf"; script: "scripts\ambient\ambientheli.sqf" -ambient helicopters spawn at ambientPads at Altis airbase. Each has a delay before it initially takes off. It is then assigned a random waypoint (which can include the players current waypoint), lands there for 60 seconds, flies to a second random waypoint, lands for 60 seconds, then retuns to it's altis airbase pad where it lands and sits anywhere from 1-5 minutes. It refuels and is repaired if damaged. Then the loop repeats. If one gets destroyed, it is deleted and a new one spawns. //"scripts\ambient\ambientheli.sqf" //2016 by Nephros private ["_waypoint1", "_waypoint2"]; //arguments _heliTypeList = _this select 0; _helipad = _this select 1; _group = _this select 2; _masterArray = _this select 3; _delay = _this select 4; //notes - in my init masterArray, some waypoint types have names, others do not, so I have to modify the code as below depending on waypoint type. Most of this code can probably be simplified for use in other scenarios. //format [location, name] _baseArray = _masterArray select 0; _hospitalArray = _masterArray select 3; _fobArray = _masterArray select 5; // format [location] _mountainArray = _masterArray select 2; _aoArray = _masterArray select 6; _slingloadArray = _masterArray select 7; _leftoverArray = [taruSite, huronSite, repairPad, rearmPad, refuelPad]; //helipads _locationList1 = [_baseArray, _fobArray, (_hospitalArray - (_hospitalArray select 0))]; _locationList2 = [_mountainArray, _aoArray, _slingloadArray, _leftoverArray]; _heliMaster = [getPos _helipad, 0, (_heliTypeList call BIS_fnc_selectRandom), _group] call BIS_fnc_spawnVehicle; _heli = _heliMaster select 0; _crew = _heliMaster select 1; _heli setPosATL [getPos _helipad select 0, getPos _helipad select 1, 0]; _heli setFuel 0; _heli land "LAND"; sleep 1; _heli setFuel 1; //_heli allowdamage false; sleep _delay; //delay before helicopter takes off while {(getDammage _heli) < 1} do { //waypoint 1 _randomizer = [1,2] call BIS_fnc_SelectRandom; If (_randomizer == 1) then {_waypoint1 = ((_locationList1 call BIS_fnc_SelectRandom) call BIS_fnc_selectRandom) select 0} else {_waypoint1 = (_locationList2 call BIS_fnc_selectRandom) call BIS_fnc_SelectRandom}; _group move getpos _waypoint1; waitUntil {unitReady _heli}; _heli land "LAND"; sleep 60; //waypoint 2 _randomizer = [1,2] call BIS_fnc_SelectRandom; If (_randomizer == 1) then {_waypoint2 = ((_locationList1 call BIS_fnc_SelectRandom) call BIS_fnc_selectRandom) select 0} else {_waypoint2 = (_locationList2 call BIS_fnc_selectRandom) call BIS_fnc_SelectRandom}; _group move getpos _waypoint2; waitUntil {unitReady _heli}; _heli land "LAND"; sleep 60; //return to base _group move getPos _helipad; waitUntil {unitReady _heli}; _heli land "LAND"; sleep ((random 240) + 60); _heli setFuel 1; _heli setDamage 0; }; deleteVehicle _heli; {deleteVehicle _x} forEach units _group; //hint "ambient heli respawning"; switch (_group) do { case ambientHeliGroup1: {ambientHeliLoop1 = [helitypeList, ambientPad1, ambientHeliGroup1, masterArray, 60]execVM "scripts\ambient\ambientheli.sqf"}; case ambientHeliGroup2: {ambientHeliLoop2 = [helitypeList, ambientPad2, ambientHeliGroup2, masterArray, 60]execVM "scripts\ambient\ambientheli.sqf"}; case ambientHeliGroup3: {ambientHeliLoop3 = [helitypeList, ambientPad3, ambientHeliGroup3, masterArray, 60]execVM "scripts\ambient\ambientheli.sqf"}; case ambientHeliGroup4: {ambientHeliLoop4 = [helitypeList, ambientPad4, ambientHeliGroup4, masterArray, 60]execVM "scripts\ambient\ambientheli.sqf"}; case ambientHeliGroup5: {ambientHeliLoop5 = [helitypeList, ambientPad5, ambientHeliGroup5, masterArray, 60]execVM "scripts\ambient\ambientheli.sqf"}; case ambientHeliGroup6: {ambientHeliLoop6 = [helitypeList, ambientPad6, ambientHeliGroup6, masterArray, 60]execVM "scripts\ambient\ambientheli.sqf"}; };
  12. nephros

    [SP]SAINT 4-1: Helicopter Pilot Altis

    Mission updated: - Patrol and attack missions include enemy helicopters - Slingloading reworked: Slingloading targets have variable weights. Helicopter weight changes dynamically based on fuel level and number of helicopter crew, which may require adjustment in order to slingload an item. A table of helicopter maximum external weight capacity vs. fuel tank level is found in the map menu, titled 'Weight Table' - Added mission: Recover damaged helicopter via slingloading. - Aesthetic changes: - Ambient helicopter helipads now flank player helipads on both sides, making take off and landing at base more challenging. - Player now starts game in HQ facing map of Altis, where mission settings can be adjusted, in order to minimize confusion.
  13. nephros

    [SP]SAINT 4-1: Helicopter Pilot Altis

    Mission updated: -'Request Assignment' and 'Call out of current Assignment' only show up in your radio menu when they are available options -added markers for player helipads, non-playable helipads to map -Mission Randomization can now be toggled at HQ. When called from a helicopter it can either be helicopter specific, or completely random. This is so that if you want completely random missions you don't have to exit your helicopter after every mission before requesting a new one. -slingload missions now have no enemy AA -fixed patrol ID bug where it was giving patrols duplicate names -On reporting crash, all passengers will disembark and wait for pickup so you can continue the mission if you wish. Medevac patients will probably be dead by then though :) -Crew can be requested / changed via radio menu when in proximity to HQ, landing pads. When you land they will disembark, and new crew will spawn at HQ. So you don't have to go to HQ every time you change your crew. -Reworked extraction - Now you pop smoke only when extraction helicopter is near the pickup site (but it still won't land without smoke/strobe), and it will automatically take you back to base. -modified SAR mission so 25% of time the wreck doesn't smoke, for increased difficulty. -added documentation to briefing- gps is sometimes reported inaccurately (up to 25%), so if your troops aren't at the waypoint you need to search around the area. And enemy patrols at LZs are random wrt presence and location. -added ambient plane flight -fixed order new heli bug -added IR strobe / green flare to heli cargo -added 5 airports as mission destinations -refuel station will no longer drive away :)
  14. In the virtual helicopter transport module, when the player boards the helicopter he is prompted to choose a transport unload location, to which the helicopter then moves. Is there a way to pre-set this location so that a transport helicopter will always automatically return the player to the main base, for instance?
  15. nephros

    [SP]SAINT 4-1: Helicopter Pilot Altis

    I'll make it so that calling in a crash also makes all units on that helicopter disembark. Perhaps I can also figure out how to make them board a new helicopter so you can return and complete the mission.
  16. nephros

    [SP]SAINT 4-1: Helicopter Pilot Altis

    You are the 3rd person to ask about co-op, so I suppose I should start looking into it. :) Unfortunately I don't know anything about multiplayer scripting yet, so it will probably take me a while. Thanks for the kind words!
  17. nephros

    [SP]SAINT 4-1: Helicopter Pilot Altis

    Mission updated. Changelog: -fixed rearm/refuel/repair bug -added option to dump fuel to 25%, 50%, 75% from helicopter cockpit action menu -added ambient helicopters -added adjustable difficulty settings at HQ. Options: no AA, light AA (armed with one rocket each), regular AA (armed with between 1-4 rockets each). Does not apply to NOE missions -tweaked aesthetics in HQ map stand action menu
  18. nephros

    [SP]SAINT 4-1: Helicopter Pilot Altis

    I accidentally uploaded a test version that only has one mission type active. I won't be able to fix it until I get home from work this afternoon, so I'd hold off on downloading until then. :angry: EDIT - I'm not terribly competent. I'm getting error message 'File not found' when attempting to replace upload with proper version, so I created a new submission. The link above has been corrected.
  19. I am having difficulty with the BIS attach slingload and detach slingload functions. I am running a script in which I attach a slingload and drop it at a repair point. If the slingload rope breaks, I want the script to stop running and the markers, task etc. to be deleted. I can't figure out why it's not working. I've tried setting the failcode for attach slingload to be a switch that I can then use to exit the remaining script: _wreckTask setSimpleTaskDestination (getPosATL _wreck); hint "Helicopter wreck recovery task assigned"; _Wp1 = [Player, _slingHelper, 10, 5,{[color="#0000FF"]_slingloadFailed = true;[/color]},targetWeight]spawn BIS_fnc_wpSlingLoadAttach; waitUntil {scriptDone _Wp1}; [color="#0000FF"]while {!(scriptdone _wp2)} do { If (slingloadFailed) exitWith {hint "You dropped the cargo!"}; _wreckTask setSimpleTaskDestination (getPosATL repairHelipad); _wp2 = [Player, repairHelipad, 20, 5, [0,360]] spawn BIS_fnc_wpSlingLoadDetach; waitUntil {scriptDone _wp2}; };[/color] //cleanup deleteVehicle _slingHelper; deleteMarker wreckMarker; player removeSimpleTask _wreckTask; crashSwitchList set [_wreckID, false]; _slingloadFailed = nul; _crashSwitch = nul; -wreckID = nul; }; but the helicopter automatically detaches the load as soon as it attaches when I run it. I've also tried deleting all of the script components directly in the failcode, but it ignores them: _wreckTask setSimpleTaskDestination (getPosATL _wreck); hint "Helicopter wreck recovery task assigned"; _Wp1 = [Player, _slingHelper, 10, 5,{ [color="#0000FF"] deleteVehicle _slingHelper; deleteMarker wreckMarker; player removeSimpleTask _wreckTask; crashSwitchList set [_wreckID, false]; _slingloadFailed = nul; _crashSwitch = nul; -wreckID = nul;[/color] },targetWeight]spawn BIS_fnc_wpSlingLoadAttach; waitUntil {scriptDone _Wp1}; _wreckTask setSimpleTaskDestination (getPosATL repairHelipad); _wp2 = [Player, repairHelipad, 20, 5, [0,360]] spawn BIS_fnc_wpSlingLoadDetach; waitUntil {scriptDone _wp2}; //cleanup deleteVehicle _slingHelper; deleteMarker wreckMarker; player removeSimpleTask _wreckTask; crashSwitchList set [_wreckID, false]; _slingloadFailed = nul; _crashSwitch = nul; -wreckID = nul; }; ... and lastly, I tried to use a failcode switch this way, which was also ignored: _wreckTask setSimpleTaskDestination (getPosATL _wreck); hint "Helicopter wreck recovery task assigned"; _Wp1 = [Player, _slingHelper, 10, 5,{[color="#0000FF"]_slingloadFailed = true; hint "You dropped the cargo"[/color]},targetWeight]spawn BIS_fnc_wpSlingLoadAttach; waitUntil {scriptDone _Wp1}; _wreckTask setSimpleTaskDestination (getPosATL repairHelipad); _wp2 = [Player, repairHelipad, 20, 5, [0,360]] spawn BIS_fnc_wpSlingLoadDetach; [color="#0000FF"]waitUntil {(scriptDone _wp2) || (_slingloadFailed)}[/color]; //cleanup deleteVehicle _slingHelper; deleteMarker wreckMarker; player removeSimpleTask _wreckTask; crashSwitchList set [_wreckID, false]; _slingloadFailed = nul; _crashSwitch = nul; -wreckID = nul; }; Any ideas why this doesn't work?
  20. Thank you rydygier! I had previously rejected exitWith when I wasn't considering using a while-do loop, and then got it my head that it only worked with .sqs for some reason. I think I can make that work.
  21. I feel like I'm missing something easy, but I want to be able to stop a script mid-way and delete all the components created in the script in the case of a certain event. As an example, I'm running a mission in which I can call for a helicopter extract (kylania's plannedExtraction.sqf) via a radio command. If the helicopter crashes or I change my mind, I want to be able to cancel the script. I can stop the script by creating a radio trigger to cancel the extraction and placing (cancelExtraction = true;) in the On activation field and then calling the plannedExtraction script with this: extractionScript = [player] execVM "plannedExtraction.sqf"; waitUntil ((scriptDone extractionScript) || (cancelExtraction)); If (cancelExtraction) then {terminate extractionScript}; but I can't delete all the script components (like waypoints, markers, and the extraction helicopter and crew) from outside the script because they are local variables. If I made them all global variables I could then delete them all individually outside the script, but I feel there must be an easier way - and I wouldn't be able to do that for a script I am calling from multiple sources and therefore needs to have local variables. Alternatively, I could alter the plannedExtraction.sqf with: while !(cancelExtraction) do { ... all the plannedExtraction code...}; delete waypoints, markers, etc. but I think the script won't terminate until it completes it's cycle. This has to be a common issue people deal with, but I can't find an answer. Any ideas?
  22. nephros

    Patrol Ops 2 Rearmed.

    This sounds great, thanks for doing it!
  23. I have been putting together a kind of sandbox on the south asia map, and one of the features I am trying to impement is the ability to recover a helicopter that has crashed (provided it is small or medium, and therefore within the external weight restriction of the heavy helicopter) and bring it back to a repair point at the sumrakent airport, via slingloading. The problem I am running into is that it appears the TOH helicopter models are not allowed as targets for slingload attachment via 'BIS fnc wpSlingLoadAttach' (although the ARMA 2 helicopter models are). If I try to create a bucket and attach it to the center of the target helicopter and then slingload the bucket: bucket setPosATL [getPosATL targetHelicopter]; bucket attachTo [targetHelicopter]; the helicopter holds the bucket to the ground and I can't slingload either. Alternatively, if I attach the target helicopter to the bucket: bucket setPosATL [getPosATL targetHelicopter]; targetHelicopter attachTo [bucket]; The bucket separates from the target helicopter on attachment, leaving the helicopter behind. Is there a way to allow the TOH helicopters as targets or do I need to find a different approach? =============================================================== SOLVED Here is the code that works: _slingHelper = "Misc_cargo_cont_net1" createVehicleLocal getPosATL targetHeli; _slingHelper hideObject true; If (targetHeli isKindOf "Heli_Medium01_Base_H") then {_slingHelper attachTo [targetHeli, [0,0,-2]]; sleep 1; detach _slinghelper; targetheli attachTo [_slingHelper,[0,0,2]]} else {_slingHelper attachTo [targetHeli, [0,0,-1.5]]; sleep 1; detach _slinghelper; targetheli attachTo [_slingHelper,[0,0,1.5]]}; Commentary (for other scripting novices like me who are trying to figure this stuff out :p ) -Since I can't directly slingload the TOH helicopter (named targetHeli), I am creating an invisible cargo in net (_slingHelper), attaching the targetHeli to the cargo in net, and then slingloading the cargo in net. I delete the cargo in net at the end, and voila! -Problems and solutions: 1) Attaching _slinghelper to targetheli doesn't work: The helicopter stays frozen to the ground when you try to lift _slinghelper. You have to attach TargetHeli to _slinghelper. 2) When you create _slinghelper through code, it will spawn about 5m away from the helicopter. To teleport it 5m over to the helicopter (and not vice versa), you have to attach _slinghelper to targetheli first, then detach it. You have to sleep 1 second or else _slinghelper won't move at all (figured that out by dumb luck). 3) The center of gravity of the cargo in net (_slinghelper) is 1.5m lower than that of the light helicopters, and 2m lower than that of the medium helicopters, so you have to offset it or else your helicopter will either be buried in the ground or floating in the air. 4) If you try to use a smaller item than the cargo in net as your _slinghelper (I tried the ammocrate first), it spins wildly when you add the weight of a helicopter to it. I haven't experimented with this yet, but if you find that the cargo in net is still not stable enough, you could probably use a shipping crate instead for added stability. You'd have to expirement with the center of gravity offset. 5) My code is set up to account for either a light or medium helicopter and ignores all other possibilities. This is because in the mission I am creating I will have already excluded hinds and large helicopters from slingloading due to their weights. Also (for other fledgling scripters), here is the full code for my test scenario in which I pick up targetHeli, deposit it at a helipad named hw3, and then land at hw1 (with a few hints thrown in). It shows how I'm doing custom waypoint scripting. A similar script will be triggered in my mission when a player reports his helicopter has crashed, and become an available task until either the task is performed, the helicopter is repaired, or the helicopter is destroyed. //heliWaypointInit.sqf //player waypoint and task testing //waypoint format: [player, target, completion radius, <arguments>] spawn <functionName>; //attachslingload arguments: [posLimit, failCode, weight] spawn BIS_fnc_wpSlingLoadAttach; //detachslingload arguments: [posLimit, LimitDir] spawn BIS_fnc_wpSlingLoadDetach; //land arguments: [dirParam, visualize] spawn BIS_fnc_wpLand; //_slinghelper offset for light: targetheli attachTo [_slingHelper,[0,0,1.5]]; //_slinghelper offset for medium: targetheli attachTo [_slingHelper,[0,0,2]]; WT_LIGHT = 722; wT_MEDIUM = 3100; //Assign weight to target helicopter based on size If (targetHeli isKindOf "Heli_Medium01_Base_H") then {targetWeight = WT_MEDIUM} else {targetWeight = WT_LIGHT}; //task setup _helitsk1 = player createsimpletask ["pick up container"]; _helitsk1 setsimpletaskdescription ["pick up the container and take it to the marker noted", "pick up container", ""]; _helitsk1 settaskstate "CREATED"; waitUntil {taskState _helitsk1 == "ASSIGNED"}; //we cant attach helicopter directly, so we use slinghelper _slingHelper = "Misc_cargo_cont_net1" createVehicleLocal getPosATL targetHeli; _slingHelper hideObject true; If (targetHeli isKindOf "Heli_Medium01_Base_H") then {_slingHelper attachTo [targetHeli, [0,0,-2]]; sleep 1; detach _slinghelper; targetheli attachTo [_slingHelper,[0,0,2]]} else {_slingHelper attachTo [targetHeli, [0,0,-1.5]]; sleep 1; detach _slinghelper; targetheli attachTo [_slingHelper,[0,0,1.5]]}; _helitsk1 setsimpletaskdestination (getPosATL _slingHelper); hint "heli task assigned"; _wp1 = [Player, _slingHelper, 10, 1, {hintC "You dropped the cargo!"},targetWeight] spawn BIS_fnc_wpSlingLoadAttach; waitUntil {scriptDone _wp1}; hint "sling load attached"; _helitsk1 setSimpleTaskDestination (getPosATL hw3); _wp2 = [Player, hw3, 10, 1, [0,360]] spawn BIS_fnc_wpSlingLoadDetach; waituntil {scriptDone _wp2}; deleteVehicle _slingHelper; hint "slingload detached"; _helitsk1 setSimpleTaskDestination (getPosATL hw1); _wp3 = [player, getPosATL hw1, 10,[],true] spawn BIS_fnc_wpLand; waitUntil {scriptDone _wp3}; _helitsk1 setTaskState "SUCCEEDED"; hintc "good job, shut down your engine!"; //cleanup player removeSimpleTask _helitsk1;
×