pierremgi 4851 Posted May 20, 2019 The code works for me. Did you write the same array (with helos only) in the vehicles types (here are the helos you spawn)? Did you place your virtual module not too close from player? _this spawn MGI_fnc_dropVeh; // must be in the vehicle init , not the crate one! The function itself can be anywhere but run by players (so in init.sqf, or in any init field of an edited object, or even in a trigger set to true as condition). Just for info, this code is now embedded into MGI advanced modules. You just have to link some vehicles + crates to my module (this one is linked to the virtual module). In this module, if the number of vehicles is equal to the number of crates, they are coupled. If not, payload is randomized. Share this post Link to post Share on other sites
NinjaCode 0 Posted July 12, 2020 I can't make this work. I sinc the drop module to the support drop module ans sinc that one to the requester and that one to me. It gives me the drop option in game, if I sinc a heli to it it will show but when it drops it is just the box Share this post Link to post Share on other sites
pierremgi 4851 Posted July 12, 2020 2 hours ago, NinjaCode said: I can't make this work. I sinc the drop module to the support drop module ans sinc that one to the requester and that one to me. It gives me the drop option in game, if I sinc a heli to it it will show but when it drops it is just the box So sync a box also or a car, or if you don't want to sync anything, just add the helo and crate/vehicle/box inside the arrays of the module. As already said if the nbr of helo (synced or class in array) is ewqual to the number of crates (vehicles,boxes... synced or class in array) the first helo in array is coupled with the first dropped thing, the 2nd one with the 2nd... If the arrays in my modules remain unbalanced, the drop is randomized whatever helo is called. Share this post Link to post Share on other sites
pierremgi 4851 Posted March 13, 2021 Next MGI ADVANCED MODULES update: the module "drop vehicle instead of crate" will allow to use airplanes instead of helicopters. On test, but released soon. Of course, you can drop vehicle... The realism is on your side. There is no need to add lines in modules fields (auto-completion). This example works with links on modules and plane/crate only. Nothing to script (except if you want to drop a specific content of the crate). Share this post Link to post Share on other sites
fawlty 30 Posted March 27, 2021 Hey Pierre, first off thanks so much for your modules, I've been putting them to good use. Question I have, Is there a way to make the heli doing the vehicle drop captive so as not to get shot down by AAA. I used to do this and set behaviour careless before using your module but haven't figured a way to do it now. example _this setCaptive 1; _this setBehaviour "CARELESS"; Pardon me if this has been answered already. Share this post Link to post Share on other sites
pierremgi 4851 Posted March 28, 2021 Yes, it's possible. Not realistic but possible. I will not add a parameter for that because I think it's more challenging for a player to order a drop when it's safe... or in despair. Right now, the line added in BI module (vehicle init) is not supposed to be modified. I must change my code for that. So next update (say tomorrow), you will just have to write: _this setCaptive TRUE; in front of the already existing line (in BI supply drop virtual module / vehicleinit field)... the whole code will be permanent. (right now, that works once in first preview then the code is deleted, back to editor...) Done. 1 Share this post Link to post Share on other sites
fawlty 30 Posted March 28, 2021 Thanks Pierre, sometimes I forget and run these drops over hostile areas on the map we haven't cleared yet resulting in no drop. Now I don't have to worry about module placement on a map. Thanks again. Share this post Link to post Share on other sites
Warlocc 0 Posted October 22, 2022 Is there any way to make this work? _crateCode = compile [this,["NATO_Tropical",1],["hide_camonet",0,"hide_mirror_1_3",0,"hide_long_antenna",0,"hide_short_antenna",0,"show_beacon_light",0,"beacon_light_on",0,"hide_mirror_1_1",0,"hide_mirror_1_2",0,"hide_mirror_2_1",0,"hide_mirror_2_2",0] ] call BIS_fnc_initVehicle; Share this post Link to post Share on other sites
pierremgi 4851 Posted October 22, 2022 1 hour ago, Warlocc said: Is there any way to make this work? _crateCode = compile [this,["NATO_Tropical",1],["hide_camonet",0,"hide_mirror_1_3",0,"hide_long_antenna",0,"hide_short_antenna",0,"show_beacon_light",0,"beacon_light_on",0,"hide_mirror_1_1",0,"hide_mirror_1_2",0,"hide_mirror_2_1",0,"hide_mirror_2_2",0] ] call BIS_fnc_initVehicle; If you're using my module synced to BI virtual drop, the crate code doesn't work in init crate of BI module (just because I hack the default crate and change it). You need to use the vehicle init field in BI module. You can already read: _this setVariable ['MGIDropHelo',true,true]; if (_this isKindOf 'plane') then {_this setVelocityModelSpace [0,100,0]}; For any modification of the crate (loadout or appearance) add a code referring to _dpCrate, like this (your demand) : _this setVariable ['MGIDropHelo',true,true]; if (_this isKindOf 'plane') then {_this setVelocityModelSpace [0,100,0]}; // not mandatory for helo _this spawn { waitUntil {!isNil {_this getVariable 'MGI_crate'}}; private _dpCrate = (_this getVariable ['MGI_crate',objNull]); [_dpCrate,["NATO_Tropical",1],["hide_camonet",0,"hide_mirror_1_3",0,"hide_long_antenna",0,"hide_short_antenna",0,"show_beacon_light",0,"beacon_light_on",0,"hide_mirror_1_1",0,"hide_mirror_1_2",0,"hide_mirror_2_1",0,"hide_mirror_2_2",0]] call BIS_fnc_initVehicle }; Of course, you can write a sqf and execVM it for better readability! Share this post Link to post Share on other sites
Warlocc 0 Posted October 22, 2022 1 hour ago, pierremgi said: If you're using my module synced to BI virtual drop, the crate code doesn't work in init crate of BI module (just because I hack the default crate and change it). You need to use the vehicle init field in BI module. You can already read: _this setVariable ['MGIDropHelo',true,true]; if (_this isKindOf 'plane') then {_this setVelocityModelSpace [0,100,0]}; For any modification of the crate (loadout or appearance) add a code referring to _dpCrate, like this (your demand) : _this setVariable ['MGIDropHelo',true,true]; if (_this isKindOf 'plane') then {_this setVelocityModelSpace [0,100,0]}; // not mandatory for helo _this spawn { waitUntil {!isNil {_this getVariable 'MGI_crate'}}; private _dpCrate = (_this getVariable ['MGI_crate',objNull]); [_dpCrate,["NATO_Tropical",1],["hide_camonet",0,"hide_mirror_1_3",0,"hide_long_antenna",0,"hide_short_antenna",0,"show_beacon_light",0,"beacon_light_on",0,"hide_mirror_1_1",0,"hide_mirror_1_2",0,"hide_mirror_2_1",0,"hide_mirror_2_2",0]] call BIS_fnc_initVehicle }; Of course, you can write a sqf and execVM it for better readability! Oh, thanks for the fast reply. Unfortunately, I'm not using your module, I'm using the script right out of this thread, called through the vehicle init field in the BI module. Got a blackfish dropping an APC and I'm trying to change those settings on the APC. Share this post Link to post Share on other sites
pierremgi 4851 Posted October 22, 2022 1 hour ago, Warlocc said: Oh, thanks for the fast reply. Unfortunately, I'm not using your module, I'm using the script right out of this thread, called through the vehicle init field in the BI module. Got a blackfish dropping an APC and I'm trying to change those settings on the APC. Ah OK, I wrote this code a long time ago. Not sure you gain in performance, compared with module. Anyway, I use _this variable instead of this and mind for single quotes inside the code. _crateCode = compile ""[_this,{_this addAction ['Arsenal',{['Open',true] spawn BIS_fnc_arsenal},nil,10,false,true,'', '']}] remoteExec ['call']; [_this,['NATO_Tropical',1],['hide_camonet',0,'hide_mirror_1_3',0,'hide_long_antenna',0,'hide_short_antenna',0,'show_beacon_light',0,'beacon_light_on',0,'hide_mirror_1_1',0,'hide_mirror_1_2',0,'hide_mirror_2_1',0,'hide_mirror_2_2',0] ] call BIS_fnc_initVehicle; _flare = if (sunOrMoon <0.5) then [{'F_20mm_Yellow'},{'smokeShellYellow'}]; _fumi = _flare createvehicle getPosATL _this; _fumi attachTo [_this,[0,0,-2]]""; should work (not tested) Share this post Link to post Share on other sites
Warlocc 0 Posted October 23, 2022 On 10/22/2022 at 4:09 AM, pierremgi said: Ah OK, I wrote this code a long time ago. Not sure you gain in performance, compared with module. Anyway, I use _this variable instead of this and mind for single quotes inside the code. _crateCode = compile ""[_this,{_this addAction ['Arsenal',{['Open',true] spawn BIS_fnc_arsenal},nil,10,false,true,'', '']}] remoteExec ['call']; [_this,['NATO_Tropical',1],['hide_camonet',0,'hide_mirror_1_3',0,'hide_long_antenna',0,'hide_short_antenna',0,'show_beacon_light',0,'beacon_light_on',0,'hide_mirror_1_1',0,'hide_mirror_1_2',0,'hide_mirror_2_1',0,'hide_mirror_2_2',0] ] call BIS_fnc_initVehicle; _flare = if (sunOrMoon <0.5) then [{'F_20mm_Yellow'},{'smokeShellYellow'}]; _fumi = _flare createvehicle getPosATL _this; _fumi attachTo [_this,[0,0,-2]]""; should work (not tested) You're awesome, thank you. Share this post Link to post Share on other sites