avibird 1 36 Posted April 1, 2018 I haven't done this since Arma but can't spawn a single magazine on the ground. I'm attempting to spawn a single magazine on the ground with no luck. I can spawn items but not magazines. I just need one additional magazine for a weapon. Thanks Avibird. 1 Share this post Link to post Share on other sites
whiztler 137 Posted April 1, 2018 Refer to the 'GroundWeaponHolder' section of https://community.bistudio.com/wiki/createVehicle 1 Share this post Link to post Share on other sites
avibird 1 36 Posted April 1, 2018 Somewhat resolved. In ARMA2 and early I'm ARMA3 I used these two different code blocks to spawn in objects into the mission that was not in the editor ect I believe ammo/weapons as well. Since the eden editor it is mostly obsolete now. ammo and weapons did not work but other items still do. * bld=" " createvehiclelocal (getposasl this);bld setdir (getdir this); * myBuilding = " " createVehicle position this; deleteVehicle this; What I want is to have a single magazine on the grounds. From the eden editor you can place single weapons now but only with one magazine I need a little more ammo lol for this gun. this code block fine to place a weapon and additional magazine down loot = "groundweaponholder"createVehicle getpos this; loot addWeaponCargo["CUP_srifle_LeeEnfield_rail",1]; loot addMagazineCargo["CUP_10x_303_M",2]; deleteVehicle this; however the placement is not exact on the location I want but you can adjust it with trial and error by moving the editor place object that you put the code block in ie small road cone. I can't fiqure out how to just place ammo down not with the weapon. is there a way just for ammo. Avibird Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted April 1, 2018 1 hour ago, avibird 1 said: is there a way just for ammo Hello there avibird 1! Some code of my Crashsites_GF Script if you want to check also . _weapons_Loot = [ //LightMachineGuns "arifle_MX_SW_Black_F", "arifle_MX_SW_F", "LMG_Mk200_F", "LMG_Zafir_F", "LMG_03_F", "MMG_01_hex_F", "MMG_01_tan_F", "MMG_02_black_F", "MMG_02_camo_F", "MMG_02_sand_F", //Apex "LMG_03_F" ]call BIS_fnc_selectRandom; //lootitems3 spawn only mags lootitems3 = "groundweaponHolder" createVehicle _yourposition; lootitems3 addweaponcargo [_weapons_Loot, 0]; // Spawn only magazines _magazines = getArray (configFile / "CfgWeapons" / _weapons_Loot / "magazines"); _magazineClass = _magazines call bis_fnc_selectRandom; lootitems3 addMagazineCargoGlobal [_magazineClass, 3]; //3 mags Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted April 2, 2018 With a tip of a Friend! HazJ selectRandom command instead of the BIS function as it is faster. selectRandom [whatever]; https://community.bistudio.com/wiki/selectRandom 1 Share this post Link to post Share on other sites
avibird 1 36 Posted April 2, 2018 @GEORGE FLOROS GR Mr. HazJ is a good dude who had help me with some stuff we all should hook up for a mission one day. The issues I am having is placement of the ammo. I am working on a prison escape mission where weapons and ammo are hidden around the prison camp and you need to find them before you get spotted by prison patrol guards. The code I am using and your script placement is not the exact location like the old code I used for arma2. There must be a simple way to spawn in magazine in exact location you want. 1 Share this post Link to post Share on other sites
whiztler 137 Posted April 2, 2018 I reckon you keep it simple. Place pencils (Land_PencilGreen_F) on the locations in the editor, name them and ingame spawn the mags on the various pencil locations (and remove the pencil). After spawning all the ammo you can remove the remaining pencils. 1 Share this post Link to post Share on other sites
HazJ 1289 Posted April 2, 2018 I think the issue is that the ground weapon holder is spawned in the correct position but weapons are kinda offset or relative to that so they don't stack. You can try to just create the weapon without the holder. 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted April 2, 2018 1 hour ago, avibird 1 said: Mr. HazJ is a good dude who had help me with some stuff we all should hook up for a mission one day. indeed! 14 minutes ago, HazJ said: but weapons are kinda offset For sure! If you want you can check also in this script: also: Spawn Loot 1.Place down a Invisible Helipad where you want loot to spawn. 2.Place one of the Scripts into init Section of the Helipad. ( not tested! , yet! ) _Mags = selectRandom [ // Mags "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag_green", "30Rnd_556x45_Stanag_red", "30Rnd_556x45_Stanag_Tracer_Red", "30Rnd_556x45_Stanag_Tracer_Green", "30Rnd_556x45_Stanag_Tracer_Yellow", "20Rnd_556x45_UW_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_green", "30Rnd_65x39_caseless_mag_Tracer", "30Rnd_65x39_caseless_green_mag_Tracer", "20Rnd_762x51_Mag", "7Rnd_408_Mag", "5Rnd_127x108_Mag", "100Rnd_65x39_caseless_mag", "100Rnd_65x39_caseless_mag_Tracer", "200Rnd_65x39_cased_Box", "200Rnd_65x39_cased_Box_Tracer", "30Rnd_9x21_Mag", "30Rnd_9x21_Red_Mag", "30Rnd_9x21_Yellow_Mag", "30Rnd_9x21_Green_Mag", "16Rnd_9x21_Mag", "30Rnd_9x21_Mag_SMG_02", "30Rnd_9x21_Mag_SMG_02_Tracer_Red", "30Rnd_9x21_Mag_SMG_02_Tracer_Yellow", "30Rnd_9x21_Mag_SMG_02_Tracer_Green", "16Rnd_9x21_red_Mag", "16Rnd_9x21_green_Mag", "16Rnd_9x21_yellow_Mag", "200Rnd_65x39_Belt", "200Rnd_65x39_Belt_Tracer_Red", "200Rnd_65x39_Belt_Tracer_Green", "200Rnd_65x39_Belt_Tracer_Yellow", "30Rnd_45ACP_Mag_SMG_01", "30Rnd_45ACP_Mag_SMG_01_Tracer_Green", "30Rnd_45ACP_Mag_SMG_01_Tracer_Red", "30Rnd_45ACP_Mag_SMG_01_Tracer_Yellow", "9Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "6Rnd_45ACP_Cylinder", "10Rnd_762x51_Mag", "10Rnd_762x54_Mag", "5Rnd_127x108_APDS_Mag", "10Rnd_338_Mag", "10Rnd_127x54_Mag", "150Rnd_93x64_Mag", "10Rnd_93x64_DMR_05_Mag", "10Rnd_9x21_Mag", "30Rnd_580x42_Mag_F", "30Rnd_580x42_Mag_Tracer_F", "100Rnd_580x42_Mag_F", "100Rnd_580x42_Mag_Tracer_F", "20Rnd_650x39_Cased_Mag_F", "10Rnd_50BW_Mag_F", "150Rnd_556x45_Drum_Mag_F", "150Rnd_556x45_Drum_Mag_Tracer_F", "30Rnd_762x39_Mag_F", "30Rnd_762x39_Mag_Green_F", "30Rnd_762x39_Mag_Tracer_F", "30Rnd_762x39_Mag_Tracer_Green_F", "30Rnd_545x39_Mag_F", "30Rnd_545x39_Mag_Green_F", "30Rnd_545x39_Mag_Tracer_F", "30Rnd_545x39_Mag_Tracer_Green_F", "200Rnd_556x45_Box_F", "200Rnd_556x45_Box_Red_F", "200Rnd_556x45_Box_Tracer_F", "200Rnd_556x45_Box_Tracer_Red_F" ]; ground1 = "groundweaponholder" createVehicle getpos this; ground1 addWeaponCargo [_Mags,1]; ground1 setPos [getPos this select 0,getPos this select 1,0.00]; Share this post Link to post Share on other sites
avibird 1 36 Posted April 3, 2018 @GEORGE FLOROS GR thank you for the script it will definitely come in handy for some missions but will not work for this one due to the fact I think using the the groundweaponholder looks for open ground to spawn in the items. You cannot hide the spawn in items they must be in the open. This is a prison Escape mission that you need to look for magazines and weapons scattered throughout the POW camp under a crate in a bush ect. There must be a simple way to spawn in a single magazine at the exact location that you want but it's over my paygrade now I have no clue I can spawn in buildings and some other items using my code lock above but not for weapons and ammo. To me this seems pretty simple there must be a way. Avibird Share this post Link to post Share on other sites
HazJ 1289 Posted April 3, 2018 @avibird 1 - Have you tried just creating it with createVehicle and no ground holder? Share this post Link to post Share on other sites
avibird 1 36 Posted April 3, 2018 I attempted it but nothing spawn in maybe i did something wrong ? Share this post Link to post Share on other sites
HazJ 1289 Posted April 3, 2018 Show me your code that you used when you tried. Share this post Link to post Share on other sites
avibird 1 36 Posted April 3, 2018 Ok at work I will post at lunch ? Share this post Link to post Share on other sites
avibird 1 36 Posted April 3, 2018 First attempt CreateVehicle = "CUP_10x_303_M" Createvehiclelocal (getposasl this); CreateVehicle setdir (getdir this); Second attempt CreateVehicle = " CUP_10x_303_M" createVehicle position this; deleteVehicle this; I can't recall attempt three and four lol Share this post Link to post Share on other sites
HazJ 1289 Posted April 3, 2018 Try: testMag = "magClassname" createVehicle getPos player; Test this first then adjust it. Remember to change classname. @avibird 1 Share this post Link to post Share on other sites
avibird 1 36 Posted April 3, 2018 Getpos player this will spawn on player? So if I want to spawn at a specific location I will put something like getposasl this? I'm trying to hide the ammo underneath bushes rocks crates scattered throughout the prison camp Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted April 3, 2018 3 hours ago, avibird 1 said: this will spawn I posted this before and now i had time to test this so it's working Spawn Loot 1.Place down a Invisible Helipad where you want loot to spawn. 2.Place one of the Scripts into init Section of the Helipad. Mags = selectRandom [ "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag_green", "30Rnd_556x45_Stanag_red", "30Rnd_556x45_Stanag_Tracer_Red", "30Rnd_556x45_Stanag_Tracer_Green", "30Rnd_556x45_Stanag_Tracer_Yellow", "20Rnd_556x45_UW_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_green", "30Rnd_65x39_caseless_mag_Tracer", "30Rnd_65x39_caseless_green_mag_Tracer", "20Rnd_762x51_Mag", "7Rnd_408_Mag", "5Rnd_127x108_Mag", "100Rnd_65x39_caseless_mag", "100Rnd_65x39_caseless_mag_Tracer", "200Rnd_65x39_cased_Box", "200Rnd_65x39_cased_Box_Tracer", "30Rnd_9x21_Mag", "30Rnd_9x21_Red_Mag", "30Rnd_9x21_Yellow_Mag", "30Rnd_9x21_Green_Mag", "16Rnd_9x21_Mag", "30Rnd_9x21_Mag_SMG_02", "30Rnd_9x21_Mag_SMG_02_Tracer_Red", "30Rnd_9x21_Mag_SMG_02_Tracer_Yellow", "30Rnd_9x21_Mag_SMG_02_Tracer_Green", "16Rnd_9x21_red_Mag", "16Rnd_9x21_green_Mag", "16Rnd_9x21_yellow_Mag", "200Rnd_65x39_Belt", "200Rnd_65x39_Belt_Tracer_Red", "200Rnd_65x39_Belt_Tracer_Green", "200Rnd_65x39_Belt_Tracer_Yellow", "30Rnd_45ACP_Mag_SMG_01", "30Rnd_45ACP_Mag_SMG_01_Tracer_Green", "30Rnd_45ACP_Mag_SMG_01_Tracer_Red", "30Rnd_45ACP_Mag_SMG_01_Tracer_Yellow", "9Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "6Rnd_45ACP_Cylinder", "10Rnd_762x51_Mag", "10Rnd_762x54_Mag", "5Rnd_127x108_APDS_Mag", "10Rnd_338_Mag", "10Rnd_127x54_Mag", "150Rnd_93x64_Mag", "10Rnd_93x64_DMR_05_Mag", "10Rnd_9x21_Mag", "30Rnd_580x42_Mag_F", "30Rnd_580x42_Mag_Tracer_F", "100Rnd_580x42_Mag_F", "100Rnd_580x42_Mag_Tracer_F", "20Rnd_650x39_Cased_Mag_F", "10Rnd_50BW_Mag_F", "150Rnd_556x45_Drum_Mag_F", "150Rnd_556x45_Drum_Mag_Tracer_F", "30Rnd_762x39_Mag_F", "30Rnd_762x39_Mag_Green_F", "30Rnd_762x39_Mag_Tracer_F", "30Rnd_762x39_Mag_Tracer_Green_F", "30Rnd_545x39_Mag_F", "30Rnd_545x39_Mag_Green_F", "30Rnd_545x39_Mag_Tracer_F", "30Rnd_545x39_Mag_Tracer_Green_F", "200Rnd_556x45_Box_F", "200Rnd_556x45_Box_Red_F", "200Rnd_556x45_Box_Tracer_F", "200Rnd_556x45_Box_Tracer_Red_F" ]; ground1 = "groundweaponholder" createVehicle getpos this; ground1 addMagazineCargoGlobal [Mags,1]; ground1 setPos [getPos this select 0,getPos this select 1,0.00]; Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted April 3, 2018 Once you create this ( in the editor ) then copy paste the item (heipad) as many times you want , without changing anything more! Share this post Link to post Share on other sites
avibird 1 36 Posted April 4, 2018 @GEORGE FLOROS GR that worked out great. I made a few small changes to meet my needs better Mags = "CUP_10x_303_M"; ground1 = "groundweaponholder" createVehicle getpos this; ground1 addMagazineCargoGlobal [Mags,1]; ground1 setPos [getPos this select 0,getPos this select 1,0.00]; deleteVehicle this; I took out the selectRandom [ ] because I want a specific magazine I added the deleteVehicle this; at the end so the editor object I am calling the script from is removed however in some cases I could use a small rock bush ect to blend into the environment. I don't really like to use Invisible Helipad because if you have chopper in the mission sometimes it will land at the location if the chopper needs to land due to damage. I had this happen before when a chopper out of the blue landed on me and my squad lol. This is very simple and almost like the code block I used in ARMA2 that I stated above. bld=" " createvehiclelocal (getposasl this);bld setdir (getdir this); I knew it was a simple fix but somethings are over my knowledge base. Once again thank you for the help and look for me on steam to hook up one of these days with HazJ. Steam name is Avibird @HazJ testMag = "magClassname" createVehicle getPos player; Could not get this to spawn anything!!! 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted April 4, 2018 17 minutes ago, avibird 1 said: @GEORGE FLOROS GR that worked out great. I made a few small changes to meet my needs better Thanks avibird 1 ! Have fun! 1 Share this post Link to post Share on other sites
HazJ 1289 Posted April 4, 2018 @avibird 1 - Did you change the classname ? I'm too lazy to start A3 to test atm but will do it later and let you know. 1 Share this post Link to post Share on other sites
avibird 1 36 Posted April 4, 2018 Yes sir I did and I used cup ammo and attempted standard vanilla Arma 3 ammo. Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted April 17, 2018 On 1/4/2018 at 7:21 PM, avibird 1 said: Avibird there is available now this script that contains everything for spawning stuff. GF Custom Loot Position Spawn Script , spawn Weapons , Mags , Items , to the desired position , configurable script. GF Custom Loot Position Spawn Script Thanks! Share this post Link to post Share on other sites