TAW_Yonose 11 Posted October 8, 2014 Hello. How do i make a any sort of ammobox drop from 300m with a parachute like it is when you do it with zeus? Thanks. Share this post Link to post Share on other sites
jshock 513 Posted October 8, 2014 You should be able to just use the createVehicle command for a steerable parachute, then the ammo box (at your altitude of 300m), then use the attachTo command to attach the parachute to the ammobox. Reference this script to get an idea: http://www.armaholic.com/page.php?id=23595 Share this post Link to post Share on other sites
TAW_Yonose 11 Posted October 8, 2014 im not very good with script:confused: Share this post Link to post Share on other sites
jshock 513 Posted October 8, 2014 Well, what is your means by which you want the ammo drop to come in? Radio trigger, add action, certain set of conditions, and would you want it to come to a pre-determined position or on a click of the map? Then maybe we can help you a bit more. Share this post Link to post Share on other sites
TAW_Yonose 11 Posted October 8, 2014 From a radio trigger, at the trigger position. Trigger is called a1 Share this post Link to post Share on other sites
jshock 513 Posted October 8, 2014 There may be a couple errors, but it's a start. In radio trigger onAct: nul = [] execVM "ammoDrop.sqf" ammoDrop.sqf: _trigPos = getPos a1; _parachute = createVehicle ["B_Parachute_02_F", [(_trigPos select 0), (_trigPos select 1), ((_trigPos select 2)+300)], [], 0, 'FLY']; _crate = createVehicle ["B_supplyCrate_F", position _parachute, [], 0, 'NONE']; _crate attachTo [_parachute, [0, 0, -1.3]]; _crate allowdamage false; Share this post Link to post Share on other sites
Beerkan 71 Posted October 8, 2014 or Without a script. In your trigger, put this in the ON ACT: cargo = "B_supplyCrate_F" createVehicle getpos thistrigger;cargo setPos [getPos thistrigger select 0, getPos thistrigger select 1, 100];[objnull, cargo] call BIS_fnc_curatorobjectedited; No faffing with parachutes or whatever, this creates the lot, parachute flyby sounds etc. simples.... Share this post Link to post Share on other sites
TAW_Yonose 11 Posted October 8, 2014 JShock, how do i change the altitude if i want it to drop from higher? I tried to change the +300 to +1000 but its still the same altitude And how do i add VAS to this ammobox, is it just to add the code into the trigger? ---------- Post added at 19:45 ---------- Previous post was at 19:39 ---------- Alright i'll go for yours Beerkan. thanks to both! Share this post Link to post Share on other sites
jshock 513 Posted October 8, 2014 For VAS just do add this line in the script: _crate addAction ["<t color='#ff1111'>Virtual Ammobox</t>", "VAS\open.sqf"]; As far as altitude, try changing the following line to this, and then change the 300 around to whatever, I could still be wrong with it though, not too sure: _parachute = createVehicle ["B_Parachute_02_F", [(_trigPos select 0), (_trigPos select 1), 300], [], 0, 'FLY']; Share this post Link to post Share on other sites
Beerkan 71 Posted October 8, 2014 (edited) JShock, how do i change the altitude if i want it to drop from higher?I tried to change the +300 to +1000 but its still the same altitude... In my example change the 100 to 1000 see below.And how do i add VAS to this ammobox, is it just to add the code into the trigger?Put this in your init.sqfFNC_AddVASAction = {_this addAction["<t color='#ff11ff'>Virtual Ammobox</t>", "VAS\open.sqf"];}; Then in your trigger change the ON ACT: to this. hint "Cargo Deployed";cargo = "B_supplyCrate_F" createVehicle getpos thistrigger;cargo setPos [getPos thistrigger select 0, getPos thistrigger select 1, 100];[objnull, cargo] call BIS_fnc_curatorobjectedited;[cargo,"Fnc_AddVASAction",nil,true] call BIS_fnc_MP; Edited October 8, 2014 by Beerkan Can't use spawn because it's a trigger Share this post Link to post Share on other sites
TAW_Yonose 11 Posted October 8, 2014 add change the ON ACT: to cargo = "B_supplyCrate_F" createVehicle getpos thistrigger;cargo setPos [getPos thistrigger select 0, getPos thistrigger select 1, 100];[objnull, cargo] call BIS_fnc_curatorobjectedited;[cargo,"Fnc_AddVASAction",nil,true] spawn BIS_fnc_MP; im getting error on cargo, Type Script, expected Nothing Share this post Link to post Share on other sites
Beerkan 71 Posted October 8, 2014 (edited) _trigPos = getPos a1; _parachute = createVehicle ["B_Parachute_02_F", [(_trigPos select 0), (_trigPos select 1), ((_trigPos select 2)+300)], [], 0, 'FLY']; _crate = createVehicle ["B_supplyCrate_F", position _parachute, [], 0, 'NONE']; _crate attachTo [_parachute, [0, 0, -1.3]]; _crate allowdamage false; @Jshock, I would add_parachute allowdamage false; See my own Simple ParaDrop script thread for explanation. (i.e. Exploding parachutes) im getting error on cargo, Type Script, expected NothingSorry, here's it corrected. You can't use spawn in a trigger. Put this in the ON ACT:hint "Cargo Deployed";cargo = "B_supplyCrate_F" createVehicle getpos thistrigger;cargo setPos [getPos thistrigger select 0, getPos thistrigger select 1, 100];[objnull, cargo] call BIS_fnc_curatorobjectedited;[cargo,"Fnc_AddVASAction",nil,true] call BIS_fnc_MP; N.B. This needs the Fnc_AddVASAction added to your init.sqf i.e. in your init.sqf put FNC_AddVASAction = {_this addAction["<t color='#ff11ff'>Virtual Ammobox</t>", "VAS\open.sqf"];}; To be honest if I knew you wanted VAS I'd have gone the script method. You still need the Fnc_AddVASAction in your init for this method to work. Here's the script version of mine. In your trigger (no need to name it) in the ON ACT: null = [getpos thistrigger] execVM "ammoDrop.sqf"; ammoDrop.sqf //null = [getpos thistrigger] execVM "ammoDrop.sqf"; hint "Cargo Deployed"; _pos = _this select 0;// The position to spawn cargo. _cargo = "B_supplyCrate_F" createVehicle _pos;//Cannot spawn creates in the air. Why BIS, why do you torment us? _cargo setPos [_pos select 0, _pos select 1, 100];// So set it up in the air. _cargo setDir (random 360);// AmmoCrates need spontaneity too. clearMagazineCargoGlobal _cargo;clearWeaponCargoGlobal _cargo;clearItemCargoGlobal _cargo;clearbackpackCargoGlobal _cargo;//We're using VAS, no need for crate items. [_cargo,'Fnc_AddVASAction',nil,true] spawn BIS_fnc_MP;// Add VAS for MP [objnull, _cargo] call BIS_fnc_curatorobjectedited;// Where the magic happens.. spawns parachute, attaches cargo AND plays aircraft whoosh sound. //Remove the following if you don't want smoke marker. while {(getPos _cargo) select 2 > 2} do { sleep 0.2; }; _smoke = "SmokeShellGreen" createVehicle position _cargo; _smoke setPos (getPos _cargo); _smoke attachTo [_cargo,[0,0,2]]; detach _smoke; Both trigger and script methods tested and working in MP. Edited October 8, 2014 by Beerkan Added comments for learner scripters Share this post Link to post Share on other sites
-ami- mofo 13 Posted November 19, 2016 Hi guys I used Beerkan's method, Basically have this in a trigger (by blufor)... cargo = "B_supplyCrate_F" createVehicle getpos thistrigger; cargo setPos [getPos thistrigger select 0, getPos thistrigger select 1, 250];[objnull, cargo] call BIS_fnc_curatorobjectedited; clearMagazineCargoGlobal cargo; clearWeaponCargoGlobal cargo; clearItemCargoGlobal cargo; clearBackpackCargoGlobal cargo; cargo addMagazineCargoGlobal ["SatchelCharge_Remote_Mag",6]; cargo addBackpackCargoGlobal ["B_Carryall_mcamo",2]; cargo addWeaponCargoGlobal ["srifle_DMR_03_F",2]; cargo addMagazineCargoGlobal ["20Rnd_762x51_Mag",24]; cargo addItemCargoGlobal ["muzzle_snds_B",2]; cargo addItemCargoGlobal ["optic_Hamr",2]; cargo addMagazineCargoGlobal ["HandGrenade",12]; cargo addItemCargoGlobal ["Binocular",2]; Works great and in MP too, only problem is that in MP it duplicates iteslf. Basically if two of us are doing a MP co-op mission we get two crates parachuting in not one.Does anybody know why this is happening and more importantly, how to stop it so we just have the 1 crate?Thanks Share this post Link to post Share on other sites
Larrow 2818 Posted November 19, 2016 When creating a trigger in the editor each machine in the game( server, clients) when loading the map will create their own copy of this trigger so each will run the code when the condition is met. Just rap the code in a isServer check so only the severs trigger spawns the crate. Share this post Link to post Share on other sites
-ami- mofo 13 Posted November 19, 2016 Thanks mate, I remembered seeing a 'server only' checkbox in the triggers options so I ticked that and that works a treat. Only the 1 supply crate now. So is it just spawned things that this will happen to as you can do other things with triggers in MP and you only get the one outcome. Share this post Link to post Share on other sites
Larrow 2818 Posted November 19, 2016 All depends on what you doing with the trigger. A mission editor trigger will always activate on every machine connected, if they are synced to things like waypoints then yes they will all activate the connection but once a waypoint is activated it does not matter how many more times it gets activated as once its done its done. Other things like modules usually work a little different as the module framework at init takes note of that its synced to a trigger and then monitors itself for the trigger activation but the modules themselves can be global or server only so their code will only run where is needed. If your writing code yourself then you have to take into consideration on what machine this code could be activated on. You can always high jack a trigger once the map has loaded and make it do something different on each machine by changing its statements or activation locally on each machine hence the reason the command associated with the previous mentioned are all local effect. I might of generalised a bit and maybe a few things could be handled differently within the engine itself but generally just treat mission editor triggers as activating on all machines. 1 Share this post Link to post Share on other sites
-ami- mofo 13 Posted November 20, 2016 Thanks mate.. so much to this editing/scripting eh. Share this post Link to post Share on other sites
Arcasil 2 Posted February 6, 2018 This is very useful. Many thanks. Share this post Link to post Share on other sites