Spriterfight 10 Posted October 3, 2020 Try wogz 's method my method works for me i dont know why it dosent for you Share this post Link to post Share on other sites
Spriterfight 10 Posted October 3, 2020 It is better just put his code in the mission init.sqf and call it in the trigger Share this post Link to post Share on other sites
wingtip 11 Posted October 3, 2020 everything is triggering without me even being in the trigger area including my hint... its set for blufor when present, here is the exact script i have currently entered into the trigger: hint "HEADQUARTERS: A supply drop is inbound. Ditch the wet suits and gear up, but quickly as enemy forces will certainly see the supply drop and may take action.";_position = (trg1 getRelPos [(random ((triggerArea trg1) select 0)), random(360)]); _posheli = getMarkerPos "helispawn"; _supplyheli = createVehicle ["rhs_uh1h_hidf", _posheli, [], 0, "FLY"]; createVehicleCrew _supplyheli; _supplycrate = "O_supplyCrate_F" createVehicle _posheli; _supplycrate attachTo [_supplyheli, [0, 0, -2]]; _supplycrate addEventHandler ["InventoryOpened", { params ["_unit", "_container"]; [ "AmmoboxInit", [ _supplycrate, true, {(_this distance _target) < 1} ] ] call BIS_fnc_arsenal; }]; _supplyhelicrew = crew _supplyheli; _heligroup = group (_supplyhelicrew select 0); _wp = _heligroup addWaypoint [_position,0]; _wp setWaypointType "MOVE"; _wp setWaypointSpeed "Full"; _wp setWaypointBehaviour "Aware"; waitUntil {_supplyheli distance _position < 100}; _para = createVehicle ["B_Parachute_02_F", [0,0,100], [], 0, ""]; _para attachTo [_supplyheli, [0, 0, -3]]; detach _supplycrate; _supplycrate attachTo [_para,[0,0,-2]]; detach _para; _supplycrate addEventHandler ["InventoryOpened", { params ["_unit", "_container"]; [ "AmmoboxInit", [ _supplycrate, true, {(_this distance _target) < 1} ] ] call BIS_fnc_arsenal; }]; _randomPosMapNoLand = [nil, ["ground"]] call BIS_fnc_randomPos; _wp2 = _heligroup addWaypoint [_randomPosMapNoLand,0]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointSpeed "Full"; _wp2 setWaypointBehaviour "Aware"; _wp2 setWaypointStatements ["true", "deleteVehicle _supplyheli"]; No matter where the marker is placed the heli instantly spawns and drops the supply spriter, can you add the attach to line for the _signal = "SmokeShellGreen" ? Thank you for all the help today.... i think we nearly have it working as intended.... Share this post Link to post Share on other sites
Spriterfight 10 Posted October 3, 2020 I can but does your marker is named helispawn?try to set the activation to radio alpha Share this post Link to post Share on other sites
wingtip 11 Posted October 3, 2020 try this and see if you get the same results as me or if it works... hopefully i uploaded this correctly as i didnt see an attachment option here for zip files https://www.dropbox.com/s/f60hxznfab5xnt7/~SpriterScript.Tanoa.rar?dl=0 Share this post Link to post Share on other sites
wogz187 1086 Posted October 3, 2020 @wingtip, I incorporated the best parts of @Spriterfight's script-- the parachute and the inventory EH on the box. Create an init.sqf or just paste this in Attribute--> Init Dialog, (or in the init of a random object-- just somewhere!). Spoiler YOU_fnc_supplyDrop= { params [["_caller", player, [objNull]]]; private _pos = [_caller, 3000, 5000, 3, 0, 20, 0] call BIS_fnc_findSafePos; private _veh= createVehicle ["B_heli_light_01_f", _pos,[],0, "FLY"]; _veh allowDamage false; private _grp=createVehicleCrew _veh; _grp setBehaviour "CARELESS"; you_supply= _veh; you_recieve= _caller; [_grp, group _caller, 10, 0, {you_supply distance you_recieve <200}, 2] spawn BIS_fnc_stalk; (leader _grp) sideChat "Supplies En Route"; waitUntil {sleep 1; _veh distance _caller < 200}; (leader _grp) sideChat "Supplies Deployed"; private _vehPos= getPosASL _veh; [_veh, _vehPos, _caller] spawn { sleep 1; private _obj = "B_cargoNet_01_ammo_f" createVehicle getPos (_this select 0); _obj setPosASL (_this select 1); private _signal = "SmokeShellGreen_infinite" createVehicle getPos _obj; _signal attachTo [_obj, [0,0,0]]; private _para = "B_Parachute_02_F" createVehicle getPos (_this select 0); _para attachTo [_obj, [0, 0, -3]]; _obj addEventHandler ["InventoryOpened", { params ["_unit", "_container"]; [ "AmmoboxInit", [ _obj, true, {(_this distance _target) < 1} ] ] call BIS_fnc_arsenal; }]; waitUntil {sleep 1; _obj distance (_this select 2) < 5}; deleteVehicle _signal; }; waitUntil {sleep 1; _veh distance _caller > 2000}; deleteVehicle _veh; {deleteVehicle _x} forEach units _grp; }; and call from your trigger's On Activation field with, []spawn YOU_fnc_supplyDrop; Change the helicopter vehicle string and you're good-to-go! Have fun! Share this post Link to post Share on other sites
Spriterfight 10 Posted October 3, 2020 https://drive.google.com/file/d/17xWOOisdFEvhIS1QirUyRpk1iQWRQoPN/view?usp=sharing here it is i implemeted wogz 's method for you his method is easier .In the init.sqf: YOU_fnc_supplyDrop= { params [["_caller", player, [objNull]]]; private _pos = [_caller, 500, 600, 3, 0, 20, 0] call BIS_fnc_findSafePos; private _veh= createVehicle ["B_heli_light_01_f", _pos,[],0, "FLY"];//you can change helicpoter here if you replace "B_heli_light_01_f" _veh allowDamage false; private _grp=createVehicleCrew _veh; _grp setBehaviour "CARELESS"; you_supply= _veh; you_recieve= _caller; [_grp, group _caller, 10, 0, {you_supply distance you_recieve <200}, 2] spawn BIS_fnc_stalk; (leader _grp) sideChat "Supplies En Route"; waitUntil {sleep 1; _veh distance _caller < 200}; (leader _grp) sideChat "Supplies Deployed"; private _vehPos= getPosASL _veh; [_veh, _vehPos, _caller] spawn { sleep 1; private _obj = "B_cargoNet_01_ammo_f" createVehicle getPos (_this select 0); _obj setPosASL (_this select 1); private _signal = "SmokeShellGreen_infinite" createVehicle getPos _obj; _signal attachTo [_obj, [0,0,0]]; private _para = "B_Parachute_02_F" createVehicle getPos (_this select 0); _para attachTo [_obj, [0, 0, -3]]; _obj addEventHandler ["InventoryOpened", { params ["_unit", "_container"]; [ "AmmoboxInit", [ _obj, true, {(_this distance _target) < 1} ] ] call BIS_fnc_arsenal; }]; waitUntil {sleep 1; _obj distance (_this select 2) < 5}; deleteVehicle _signal; }; waitUntil {sleep 1; _veh distance _caller > 2000}; deleteVehicle _veh; {deleteVehicle _x} forEach units _grp; }; 1 Share this post Link to post Share on other sites
wingtip 11 Posted October 3, 2020 this is some great stuff experimenting with both your scripts... i just tried wogz script and it worked but when it deployed the supply drop the crate came out of the heli , and the parachute deployed but the chute wasnt attached to the crate, the crate fell like a rock while the parachute floated away hahahahahahahaha Share this post Link to post Share on other sites
Spriterfight 10 Posted October 3, 2020 11 minutes ago, wogz187 said: @wingtip, I incorporated the best parts of @Spriterfight's script-- the parachute and the inventory EH on the box. Create an init.sqf or just paste this in Attribute--> Init Dialog, (or in the init of a random object-- just somewhere!). Reveal hidden contents YOU_fnc_supplyDrop= { params [["_caller", player, [objNull]]]; private _pos = [_caller, 3000, 5000, 3, 0, 20, 0] call BIS_fnc_findSafePos; private _veh= createVehicle ["B_heli_light_01_f", _pos,[],0, "FLY"]; _veh allowDamage false; private _grp=createVehicleCrew _veh; _grp setBehaviour "CARELESS"; you_supply= _veh; you_recieve= _caller; [_grp, group _caller, 10, 0, {you_supply distance you_recieve <200}, 2] spawn BIS_fnc_stalk; (leader _grp) sideChat "Supplies En Route"; waitUntil {sleep 1; _veh distance _caller < 200}; (leader _grp) sideChat "Supplies Deployed"; private _vehPos= getPosASL _veh; [_veh, _vehPos, _caller] spawn { sleep 1; private _obj = "B_cargoNet_01_ammo_f" createVehicle getPos (_this select 0); _obj setPosASL (_this select 1); private _signal = "SmokeShellGreen_infinite" createVehicle getPos _obj; _signal attachTo [_obj, [0,0,0]]; private _para = "B_Parachute_02_F" createVehicle getPos (_this select 0); _para attachTo [_obj, [0, 0, -3]]; _obj addEventHandler ["InventoryOpened", { params ["_unit", "_container"]; [ "AmmoboxInit", [ _obj, true, {(_this distance _target) < 1} ] ] call BIS_fnc_arsenal; }]; waitUntil {sleep 1; _obj distance (_this select 2) < 5}; deleteVehicle _signal; }; waitUntil {sleep 1; _veh distance _caller > 2000}; deleteVehicle _veh; {deleteVehicle _x} forEach units _grp; }; and call from your trigger's On Activation field with, []spawn YOU_fnc_supplyDrop; Change the helicopter vehicle string and you're good-to-go! Have fun! i had to 0 = [] spawn YOU_fnc_supplyDrop to work in the activation. 1 Share this post Link to post Share on other sites
Spriterfight 10 Posted October 3, 2020 2 minutes ago, wingtip said: this is some great stuff experimenting with both your scripts... i just tried wogz script and it worked but when it deployed the supply drop the crate came out of the heli , and the parachute deployed but the chute wasnt attached to the crate, the crate fell like a rock while the parachute floated away hahahahahahahaha Does it work for you now?You messed up a little bit the trigger but no problem here.It is wogz s merit because he created an easier script Share this post Link to post Share on other sites
wingtip 11 Posted October 3, 2020 ummmm after you edited it, the heli comes in much sooner, to soon actually so you may want to make it spawn in further distance away. but anyways, again it comes in, drops the supply but i think its hitting the ground before the chute is fully deployed.... maybe if the rate of decent of the supplydrop is changed it would give the chute time to open.... right now its falling like a rock and the chute isnt fully opened till its already on the ground.... is this the line to change the helis start position? _veh= createVehicle ["rhs_uh1h_hidf", _pos,[],0, "FLY"]; Share this post Link to post Share on other sites
Spriterfight 10 Posted October 3, 2020 14 minutes ago, wingtip said: ummmm after you edited it, the heli comes in much sooner, to soon actually so you may want to make it spawn in further distance away. but anyways, again it comes in, drops the supply but i think its hitting the ground before the chute is fully deployed.... maybe if the rate of decent of the supplydrop is changed it would give the chute time to open.... right now its falling like a rock and the chute isnt fully opened till its already on the ground.... is this the line to change the helis start position? _veh= createVehicle ["rhs_uh1h_hidf", _pos,[],0, "FLY"]; Yes the first part the "rhs_uh1h_hidf" is the type ,classname. The _pos is the position which is given at the begining of the script if you want to change the distance then find this line: private _pos = [_caller, 500, 600, 3, 0, 20, 0] call BIS_fnc_findSafePos; the 500 and 600 is the radius around the caller who called the script it can be whatever you want 500m and 600m or 1000m and 1000m but change this only if oyu want the distance. ifyou want height then you can add this line [50, "ASL"] call BIS_fnc_setHeight; below this in the init.sqf and be careful. You can change the 50 this means 50 meter above sea level you can set it like 600m or whatever you want private _pos = [_caller, 500, 600, 3, 0, 20, 0] call BIS_fnc_findSafePos; private _veh= createVehicle ["B_heli_light_01_f", _pos,[],0, "FLY"]; _veh allowDamage false; Share this post Link to post Share on other sites
wingtip 11 Posted October 3, 2020 do you have a discord where i can chat with you faster so i dont take up all your time on the forums here ? Share this post Link to post Share on other sites
Spriterfight 10 Posted October 3, 2020 2 minutes ago, wingtip said: do you have a discord where i can chat with you faster so i dont take up all your time on the forums here ? Yes i have spriterfighter#0678 Share this post Link to post Share on other sites
wogz187 1086 Posted October 3, 2020 @wingtip, *Changed flight altitude to allow for longer parachute air-time *Added exit if function is called again before finishing *Added optional param to enable full arsenal on box *Minor tweaks Spoiler YOU_fnc_supplyDrop= { params [["_caller", player, [objNull]], ["_ars", false, [false]]]; if (_caller getVariable ["YOU_supplyIN", false]) exitWith { systemChat "NOT READY"}; _caller setVariable ["YOU_supplyIN", true]; private _pos = [_caller, 3000, 5000, 3, 0, 20, 0] call BIS_fnc_findSafePos; private _veh= createVehicle ["B_heli_light_01_f", _pos,[],0, "FLY"]; _veh allowDamage false; private _grp=createVehicleCrew _veh; _grp setBehaviour "CARELESS"; _veh flyinheight 180; you_supply= _veh; you_recieve= _caller; [_grp, group _caller, 10, 0, {you_supply distance you_recieve <300}, 2] spawn BIS_fnc_stalk; (leader _grp) sideChat "Supplies En Route"; waitUntil {sleep 1; _veh distance _caller < 300}; (leader _grp) sideChat "Supplies Deployed"; private _vehPos= getPosASL _veh; [_veh, _vehPos, _caller, _ars] spawn { sleep 1; private _obj = "B_cargoNet_01_ammo_f" createVehicle getPos (_this select 0); _obj setPosASL (_this select 1); private _signal = "SmokeShellGreen_infinite" createVehicle getPos _obj; _signal attachTo [_obj, [0,0,0]]; private _para = "B_Parachute_02_F" createVehicle getPos (_this select 0); _para attachTo [_obj, [0, 0, -3]]; if (_this select 3) then { [_obj, "Open Arsenal", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "alive _this", "alive _this", {}, {}, { [ "Open", [ true ] ] call BIS_fnc_arsenal; }, {}, [], 2, 0, false, true] call BIS_fnc_holdActionAdd; }; waitUntil {sleep 1; _obj distance (_this select 2) < 10}; deleteVehicle _signal; }; waitUntil {sleep 1; _veh distance _caller > 2000}; deleteVehicle _veh; {deleteVehicle _x} forEach units _grp; _caller setVariable ["YOU_supplyIN", false]; }; Have fun! 1 Share this post Link to post Share on other sites
Gunter Severloh 4068 Posted October 4, 2020 You guys miss our thread? Script also a module for it, has supply drop via map click or smoke signal, slingload, you can define what is being supplied, even setup arsenal for it. The script's initial creation goes back to 2013 with the idea of you throwing smoke to signal a heli your location once hes in your area. All the quirks, and things have been worked out since then. Module makes it easier as you can have ammo resupply, CAS, and transport. Share this post Link to post Share on other sites
wingtip 11 Posted October 4, 2020 we already have it working the way i needed it to.... thanks though.... 1 Share this post Link to post Share on other sites